You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org> on 2017/02/07 08:45:41 UTC

[jira] [Created] (UIMA-5303) selectPreceding fails to skip over annotations

Richard Eckart de Castilho created UIMA-5303:
------------------------------------------------

             Summary: selectPreceding fails to skip over annotations
                 Key: UIMA-5303
                 URL: https://issues.apache.org/jira/browse/UIMA-5303
             Project: UIMA
          Issue Type: Bug
          Components: uimaFIT
    Affects Versions: 2.0.0uimaFIT
            Reporter: Richard Eckart de Castilho
            Assignee: Richard Eckart de Castilho
             Fix For: 2.3.0uimaFIT


The annotation index is sorted by begin (ascending) and end (descending). That effect is taken into account in selectFollowing and selectBetween to ensure that only annotations that begin after a certain offset or that lie entirely between two given offsets are returned.

The present implementation of selectPreceding seeks backwards from the reference annotation until it finds the first annotation that ends before the start of the reference annotation. However, then it fails to recognize that the end offsets of annotations are not monotonically decreasing because the end-offset is only the secondary sorting criterium (the primary criterium is the begin-offset). This appears to be a bug in the present implementation.

This issue exists since when selectPreceding was first introduced in version 1.1.0 (pre-Apache). Hence it is difficult to tell if anybody has come to rely on it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)