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

`between` throws an exception for overlapping annotations

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0SDK
    • Fix Version/s: 3.0.1SDK
    • Component/s: UIMA
    • Labels:
      None

      Description

      SelectFS throws an exception in the following case. Why not return an empty list?

          Token t1 = new Token(jCas, 45, 57);
          t1.addToIndexes();
          Token t2 = new Token(jCas, 52, 52);
          t2.addToIndexes();
      
          new Sentence(jCas, 52, 52).addToIndexes();
      
          // uimaFIT: selectBetween(jCas, Sentence.class, t1, t2);
          List<Sentence> stem1 = jCas.select(Sentence.class).between(t1, t2).asList();
          assertTrue(stem1.isEmpty());
      
      java.lang.IllegalArgumentException: End value must be >= Begin value
      	at org.apache.uima.cas.impl.SelectFSs_impl.makePosAnnot(SelectFSs_impl.java:855)
      	at org.apache.uima.cas.impl.SelectFSs_impl.between(SelectFSs_impl.java:435)
      	at org.apache.uima.cas.impl.SelectFSs_impl.between(SelectFSs_impl.java:97)
      ...
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: