[
https://issues.apache.org/jira/browse/UIMA-4455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588214#comment-14588214
]
Peter Klügl commented on UIMA-4455:
-----------------------------------
Hmm... this is actually not a bug but a feature.
Some explanation:
Conjunctive rule elements need to match on the same position, and all of them
need to return a successful match. In the examples, we have a common
left-to-right matching. So, the first rule element is the start anchor for the
complete rule and also for the conjunctive elements. In the first rule, we
match on "all" DirectSpeech annotations and then directly on their feature
"SpokenTo" values. Thus, these annoations build up the acutal match on which
the condition is evaluated. These annotations are then also used for evaluating
the other conjunctive rule elements. The second rule element tries to match on
a DirectSpeed annotation, but fails because the SpokenTo annotation was
somewhere else.
The second rule starts with a match on DirectSpeech annotations and then tries
again to find a DirectSpeech annotation on the same position in order to
evaluate its feature value.
Not very intuitive, but actually quite helpful if one knows what to do.
> Ruta: conjunctive rule elements not order independent
> -----------------------------------------------------
>
> Key: UIMA-4455
> URL: https://issues.apache.org/jira/browse/UIMA-4455
> Project: UIMA
> Issue Type: Bug
> Components: ruta
> Affects Versions: 2.3.0ruta
> Reporter: Peter Klügl
> Fix For: 2.3.1ruta
>
>
> Example:
> This fails:
> {noformat}
> (DirectSpeech.SpokenTo{PARTOF(FamilyRelationIndicator)} & DirectSpeech{->
> CREATE(Relation, "Agens" = DirectSpeech.Speaker, "Agens2" =
> DirectSpeech.SpokenTo)});
> {noformat}
> but this works:
> {noformat}
> (DirectSpeech{-> CREATE(Relation, "Agens" = DirectSpeech.Speaker, "Agens2" =
> DirectSpeech.SpokenTo)} &
> DirectSpeech.SpokenTo{PARTOF(FamilyRelationIndicator)});
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)