uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: get all the annotations located between two positions
Date Wed, 11 Jul 2007 23:38:59 GMT
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.


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

View raw message