You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Peter Klügl (Jira)" <de...@uima.apache.org> on 2022/01/07 09:20:00 UTC

[jira] [Commented] (UIMA-6406) Removing an annotation inside a BLOCK only takes effect outside the block

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

Peter Klügl commented on UIMA-6406:
-----------------------------------

The problem is caused by some "optimization" which returns the current window without checking if that annotation is in the index. In the example, this happens becuase the block head rule is MyType and the rule in the block matches also on MyType.

It's fixed now.

> Removing an annotation inside a BLOCK only takes effect outside the block
> -------------------------------------------------------------------------
>
>                 Key: UIMA-6406
>                 URL: https://issues.apache.org/jira/browse/UIMA-6406
>             Project: UIMA
>          Issue Type: Bug
>          Components: Ruta
>    Affects Versions: 3.1.0ruta
>         Environment: Environment:
> - SO: macOS 10.14.6
> - AdoptOpenJDK 1.8.0_252-b09
> - uimaj-core 3.2.0
> - ruta-core 3.1.0
>            Reporter: Beni Santos
>            Assignee: Peter Klügl
>            Priority: Major
>
> The following snippet prints {{"Not removed yet!"}} in Ruta {*}3.1.0{*}:
>  
> {code:java}
> BLOCK(SoftRemove) MyType.feat=="foo"{} {
>     t:MyType.feat=="foo"{-> UNMARK(t)};
>     t:MyType.feat=="foo"{-> LOG("Not removed yet!")}; 
> }
> // Now it's removed
> {code}
>  
> It works well (and does not print anything) in Ruta 3.0.1 and Ruta 2.x.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)