Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5303

selectPreceding fails to skip over annotations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0uimaFIT
    • 2.3.0uimaFIT
    • uimaFIT
    • None

    Description

      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.

      Attachments

        Activity

          People

            rec Richard Eckart de Castilho
            rec Richard Eckart de Castilho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: