uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viorel Morari (Jira)" <...@uima.apache.org>
Subject [jira] [Updated] (UIMA-6217) Ruta: Label value comparison fails within greedy inlined rule
Date Fri, 10 Apr 2020 15:54:00 GMT

     [ https://issues.apache.org/jira/browse/UIMA-6217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Viorel Morari updated UIMA-6217:
--------------------------------
    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.



{code:java}
  @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");
  }
{code}

Test in {{AnnotationLabelExpressionTest}} -> {{testInlineWithQuantifier}}.

 

  was:In case of a greedy match, the comparison is not restricted to the annotation referenced
by a label. Instead, any successful label comparison would validate the greedy rule element.
For more details, see {{AnnotationLabelExpressionTest}} -> {{testInlineWithQuantifier}}.


> Ruta: Label value comparison fails within greedy inlined rule
> -------------------------------------------------------------
>
>                 Key: UIMA-6217
>                 URL: https://issues.apache.org/jira/browse/UIMA-6217
>             Project: UIMA
>          Issue Type: Bug
>          Components: Ruta
>    Affects Versions: 3.0.0ruta, 2.8.0ruta, 2.8.1ruta
>            Reporter: Viorel Morari
>            Priority: Major
>
> 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.

> {code:java}
>   @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");
>   }
> {code}
> Test in {{AnnotationLabelExpressionTest}} -> {{testInlineWithQuantifier}}.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message