Did you consider using subIterators? These are (briefly) described in section 4.7.4 of the Apache UIMA Reference book, and may include exactly what you're trying to get at - an interator over elements that are "contained" in the span of other elements.

-Marshall

Julien Nioche wrote:
Hi,

Sorry if someone already asked the question.
Is there a direct way to obtain from a Cas all the annotations of a given type located between two positions in the text? Something like getContained(String type,int start,int end)? I am trying to get all the Tokens contained within a specific Sentence. I have used iterators for doing that and compared the offset with those of the Sentence but it is a bit tedious. Have I missed something obvious?

Thanks

Julien



Reply via email to