uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Campbell <mcampb...@syrres.com>
Subject Re: AnnotationIndex tree()
Date Mon, 30 Jul 2007 13:17:41 GMT
Actually...I may have put my foot in my mouth on Friday concerning 
DocumentAnnotation containing only one child annotation.  The bug in the 
AnnotationIndexImpl addChildredn() method may still be an issue though.  
Sorry for the confusion.


-Matt

Matthew Campbell wrote:
> Hey folks:
>
>    I was just wondering if anyone else was having any luck with the 
> tree() method in AnnotationIndexImpl.  I've been walking through it 
> with the debugger and believe that the child subiterator in 
> addChildren() never gets pushed to the next annotation, so we get 
> stuck in the while loop.  I changed the while loop to the code below 
> and it gets through fine:
>
> while (it.hasNext()) {
>   annot = (AnnotationFS) it.next();
>   dtr = new AnnotationTreeNodeImpl();
>   dtr.set(annot);
>   node.addChild(dtr);
>   addChildren(dtr, subiterator(annot));
> }
>
>    On a somewhat unrelated note, I'm basically trying to make a tree 
> of all the annotations in the document, so I'm passing in the 
> DocumentAnnotation into the tree function.  Is there a reason the 
> DocumentAnnotation only has one child via a subiterator (which is a 
> SourceDocumentInformation annotation)?  I assumed that since it's 
> range covers the entire document's length and is the first annotation 
> in the index, a subiterator on this annotation would iterate over all 
> of the strict unambiguous annotations in the document.  Thanks in 
> advance for the help - I've only been working with UIMA for a few 
> weeks now so I'm still getting my head around everything, but it's a 
> great tool.
>
>
>
> -Matt
>

Mime
View raw message