[
https://issues.apache.org/jira/browse/UIMA-6340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17300793#comment-17300793
]
Michael Stenger commented on UIMA-6340:
---------------------------------------
The same holds for BEFORE, by the way.
> Ruta: Condition AFTER does not respect BLOCK window
> ---------------------------------------------------
>
> Key: UIMA-6340
> URL: https://issues.apache.org/jira/browse/UIMA-6340
> Project: UIMA
> Issue Type: Bug
> Components: Ruta
> Affects Versions: 2.8.1ruta, 3.0.1ruta
> Reporter: Michael Stenger
> Priority: Minor
> Fix For: 2.9.0ruta, 3.1.0ruta
>
>
> As I understand the guide on this subject, AFTER, and any other such
> condition, should limit its search for annotations of the passed types to the
> window defined by the current scope. Hence, if used within a BLOCK, AFTER
> should disregard any annotations before (and after, for that matter) the
> window given by the matched annotation in the block's head. However, the
> AnnotationIndex iterator used in _AfterCondition.check_ to find annotations
> of the given type is apparently not meant to be used in that way (it probably
> also ignores type visibility, but I didn't check this).
> Example:
> - Text (a bit strange, I know...):
> {noformat}
> This is just a 6 6 demo file. Now AND then... We'll see....,
> Mouse House!? You can drag and drop your own Files (:) to the editor in the
> middle
> of the page ().
> {noformat}
> - Script:
> {noformat}
> DECLARE NamedEntity, Stwr, IEEntity, Paragraph;
> "demo"{-> NamedEntity};
> ("Mouse" # "drag") {-> Paragraph};
> // test within block
> BLOCK (after) Paragraph{} {
> CW {AFTER(NamedEntity) -> Stwr};
> }
> {noformat}
> - Marked annotations (of type Stwr only):
> {noformat}
> Mouse, House, You
> {noformat}
> - Expected (of type Stwr):
> {noformat}
> <None>
> {noformat}
> Regards,
> Michael
--
This message was sent by Atlassian Jira
(v8.3.4#803005)