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

JCasUtil Subiterator returns annotations which are not within borders of the container (parent) annotation if parameter "strict" is set to "false"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.4.1SDK
    • Core Java Framework
    • None

    Description

      • JCasUtil Subiterator returns annotations which are not within the border of the container (parent) annotation if parameter "strict" is set to "false"
      • See attached maven project for test setup, java classes, a SIMPLIFIED typesystem and the test CAS xml-file.
      • We have two annotations, "SentenceAnnotation" and "ValueAnnotation". A "SentenceAnnotation" covers a sentence and the "ValueAnnotation" covers a numerical value.
      • We have the following example plank text:
        • "This is sentence A with no value. This is sentence B with value 377."
        • Creates two sentence annotations ("This is sentence A with no value." and "This is sentence B with value 377.") and one value annotation ("377").
        • Now, if i want to get all "ValueAnnotation" within a "SentenceAnnotation", i iterate over each "SentenceAnnotation" and use JCasUtil.iterator(...) to get the ValueAnnotations with the following parameters: JCasUtil.iterator(currentSentence, ValueAnnotation.class, false, false);
        • As a result, i get for the first sentence also the value of the second sentence and this might be wrong because even if "strict" is set to "false", the begin of the "ValueAnnotation" should be smaller than the end of the "SentenceAnnnotation". But in the example given the begin of the "ValueAnnotation" is after the end of the FIRST "SentenceAnnotation"

      Attachments

        Issue Links

          Activity

            People

              rec Richard Eckart de Castilho
              uima_thomas Thomas G.
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: