Hello David, that works perfectly well.
Thank you, Armin -----Ursprüngliche Nachricht----- Von: David Garcia Narbona [mailto:[email protected]] Gesendet: Mittwoch, 19. Juni 2013 13:01 An: [email protected] Betreff: Re: UIMA 2.4.0 - AnnotationIndex.Subiterator Sorry, I meant: AnnotationIndex<AnnotationFS> indexB = cas.getAnnotatinIndex(typeB); ... FSIterator<AnnotationFS> itB = indexB.subiterator(annotA); David El 19/06/2013 12:53, David Garcia Narbona escribió: > Hi, > > it should be: > > FSIterator<AnnotationFS> itB = indexA.subiterator(annotB); > > > David > > El 19/06/2013 12:47, [email protected] escribió: >> Hi, >> >> Using this code >> >> AnnotationIndex<AnnotationFS> indexA = cas.getAnnotatinIndex(typeA); >> FSIterator<AnnotationFS> itA = indexA.iterator(); >> >> // outer loop >> while (itA.hasNext()) { >> AnnotationFS annotA = itA.next(); >> FSIterator<AnnotationFS> itB = indexA.subiterator(annotA); >> >> // inner loop >> while (itB.hasNext()) { >> AnnotationFS annotB = itB.next(); >> // do something >> } >> } >> >> the inner loop is never run. There are annotations covered by annotA. Have I >> done something wrong? >> >> Cheers, >> Armin >>
