uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Boehme <timo.boe...@ontochem.com>
Subject Re: iterator positioning on same region annotations
Date Wed, 07 Oct 2009 11:33:52 GMT
Thanks Thilo and Matthias for the explanations which confirmed my
assumptions.

Thilo Goetz wrote:
> Just to clarify: the moveTo() method tries to move the
> iterator to a position such that the annotation at the
> position is equal to the one you're looking for.  If
> there is more than one such annotation, it is undefined
> which one the iterator will point to.
> 
> Is this consistent with the API docs?  I would say it
> isn't.  We say "move the iterator to the first FS...".
> Intuitively, that should mean to the "leftmost" FS, but
> in fact it is implemented to mean the first one that
> the algorithm finds, which will generally _not_ be the
> leftmost one.

I think the API docs for FSIndex.iterator(FeatureStructure fs) is even
more inconsistent:
 "...The position of the iterator will be set such that the feature
structure returned by a call to the iterator's  get() method is greater
than or equal to fs, and any previous FS is less than FS..."
Thus here it really means "leftmost" FS which, as I pointed out, is not.

I will open a bug report on this.


--Timo

 Timo Boehme
 OntoChem GmbH
 H.-Damerow-Str. 4
 06120 Halle/Saale
 T: +49 345 4780472
 F: +49 345 4780471
 timo.boehme@ontochem.com

_____________________________________________________________________

 OntoChem GmbH
 Geschäftsführer: Dr. Lutz Weber
 Sitz: Halle / Saale
 Registergericht: Stendal
 Registernummer: HRB 215461
_____________________________________________________________________


Mime
View raw message