uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Boehme (JIRA)" <uima-...@incubator.apache.org>
Subject [jira] Created: (UIMA-1601) moveTo() and iterator(fs) do not point to "leftmost" FS
Date Wed, 07 Oct 2009 12:07:31 GMT
moveTo() and iterator(fs) do not point to "leftmost" FS

                 Key: UIMA-1601
                 URL: https://issues.apache.org/jira/browse/UIMA-1601
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
    Affects Versions: 2.2.2
            Reporter: Timo Boehme

According to the API docs FSIterator.moveTo(FeatureStructure fs) should move the iterator
to "the first features structure that is equal to fs". In case we have multiple annotations
of same type and same region (same start/end) as fs moveTo() will point to one of them but
not necessarily to the first (leftmost) one (in iterator order).
The inconsistency to the API doc is even more clear with FSIndex.iterator(FeatureStructure
fs). The API doc states: "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 if we have multiple annotations of same type as fs and
same region one would expect the iterator to start with the left most one and return all of
these annotations using next(). However as with moveTo() this is not the case. E.g. after
iterator creation calling moveToPrevious() followed by get() returns sometimes one of the
annotations with same region as fs (and same type).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message