You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Silvestre Losada (JIRA)" <de...@uima.apache.org> on 2015/02/26 17:23:05 UTC

[jira] [Commented] (UIMA-4261) Partofneq does not match all annotations if created by exec action.

    [ https://issues.apache.org/jira/browse/UIMA-4261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14338637#comment-14338637 ] 

Silvestre Losada commented on UIMA-4261:
----------------------------------------

I think that the problem is ExecAction.callEngine when the action is trying to re-index annotations of types provided by the action there in the code first tries to remove the annotation from ruta stream and then create it again with more information.  The thing is that if the annotation is created by the analysis engine executed in the action,  it does not exist on stream so It should not be removed from stream, because does not exist yet. In source code it seems that always are first removed and then added.

for (Entry<RutaBasic, Collection<AnnotationFS>> entry : entrySet) {
          for (AnnotationFS each : entry.getValue()) {
            stream.removeAnnotation(each);
            stream.addAnnotation(each, true, match);
          }
        }

> Partofneq does not match all annotations if created by exec action.
> -------------------------------------------------------------------
>
>                 Key: UIMA-4261
>                 URL: https://issues.apache.org/jira/browse/UIMA-4261
>             Project: UIMA
>          Issue Type: Bug
>          Components: ruta
>    Affects Versions: 2.3.0ruta
>            Reporter: Silvestre Losada
>             Fix For: 2.3.1ruta
>
>         Attachments: TestRutaS.zip
>
>
> PARTOFNEQ is not able to match all annotations if the Annotations are created by external analysis engine. Here is an example
> ENGINE TestAE;
> Document{-> EXEC(TestAE,{TestType})};
> (TestType{-> UNMARKALL(TestType)}){PARTOFNEQ(TestType)};
> The TestAE is generating 4 annotations for input test rebecca minkoff mini mac
> rebecca minkoff mini mac -> TestType
> minkoff -> TestType
> mini mac -> TestType
> mac -> TestType
> PARTOFNEQ is able to match only "minkoff" and "mini mac".
> It seems that  ExecAction is removing the Type form RutaBasic.partOf array at some point of the execution. After that in PartOfNeqCondition when  method check is executed  partOf variable is always false (see below source code). It is because the Type was removed previously from ruta basic.
>     boolean partOf = beginAnchor.isPartOf(t) || endAnchor.isPartOf(t);
>     if (!partOf) {
>       return false;
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)