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

select.coveredBy with includeAnnotationsWithEndBeyondBounds has broken edge case

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1SDK
    • Fix Version/s: 3.2.0SDK
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      coveredBy should find any annotations starting in the selection range and optionally including those which do not end in the selection range. There is an edge case where this does not work if the begin of the selection range is equal to the begin of an annotation that extends beyond the end of the selection range. The following test fails:

      AnnotationFS annotation = cas.createAnnotation(cas.getAnnotationType(), 0, 2);
          cas.addFsToIndexes(annotation);
      
          List<AnnotationFS> result = cas.select(Annotation.class)
              .coveredBy(0, 1)
              .includeAnnotationsWithEndBeyondBounds()
              .collect(toList());
      
          assertThat(result)
              .as("Selection (0-1) including start position (0) but not end position (2)")
              .containsExactly(annotation);
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: