On Fri, Jan 6, 2023 at 6:47 AM Richard Eckart de Castilho <r...@apache.org>
wrote:

UIMAv3 still has indices, but as in UIMAv2, one normally does not have to
> configure them.
> UIMA (Java) automatically creates indices for all subtypes of Annotation.
> Also, there is a general index for all FeatureStructures. The same is true
> for Cassis.
>
> MySentence and MyNER in your code appear to be subtypes of Annotation and
> you don't seem to define any keys in addition/other than begin/end, so an
> index definition should not be required.
>

Oh yes, you're correct. I got carried away after reading the original paper
linked by Eddie. I never used custom indexes in UIMA (Java) although I was
aware there were some corner cases that needed them for the show. In this
particular example the custom indices do buy you some good stuff (the top-k
sentences need more slow Python code otherwise, the selected NER bit can be
done easily by defining a new annotation). Interestingly, I wrote that
top-k code in Java many times because... I just didn't know the indices
could be used that way. In a way this was a bit of a contrived code to show
what UIMA-CPP can do for the Python people.

P

Reply via email to