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

select.coveredBy with includeAnnotationsWithEndBeyondBounds has broken edge case

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.1SDK
    • 3.2.0SDK
    • Core Java Framework
    • 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

              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: