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
