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

select.covering should bind to AnnotationFS

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Workaround
    • 3.1.1SDK
    • None
    • UIMA
    • None

    Description

      The following code does not compile because select.covering() uses TOP instead of AnnotationFS as the generic type. Consequently, getBegin() and getEnd() are not available on the "s" used in the filter expressions. But since covering() only makes sense for annotations, binding the generic type to TOP doesn't seem to make much sense:

      return aCas.select(getType(aCas, Sentence.class)).covering(aBegin1, aBegin1)
          .filter(s -> s.getBegin() <= aBegin1 && aBegin1 < s.getEnd())
          .filter(s -> s.getBegin() <= aBegin2 && aBegin2 < s.getEnd()).findFirst()
          .isPresent();

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: