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

Ruta: Label value comparison fails within greedy inlined rule

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0ruta, 2.8.0ruta, 2.8.1ruta
    • Fix Version/s: None
    • Component/s: Ruta
    • Labels:
      None

      Description

      In case of a greedy match, the label comparison is not restricted to the annotation referenced by the label. Instead, any successful label comparison would validate the greedy rule element.

        @Test
        public void testInlineWithQuantifier() throws Exception {
          
          String script = "";
          script += "CW{-> Struct1, Struct1.a=sw} sw:SW;\n";
          script += "sw:SW{-> Struct1, Struct1.a=sw};\n";
          script += "p:PERIOD{-> Struct1, Struct1.a=p};\n";
          script += "(s1:Struct1<-{u1:s1.a;} (s2:Struct1<-{u2:s2.a{u2.ct==u1.ct};})+){-> T1};\n";
          CAS cas = this.applyOnStruct4Cas(script);
          RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Some text");
        }
      

      Test in AnnotationLabelExpressionTest -> testInlineWithQuantifier.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              viorel Viorel Morari
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: