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

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

This is an interesting problem. We tracked it down to internal maps in 
uimaj-core. There is a problem when an annotation (JCas cover class object)  is 
created first time within a PEAR context. It is then replaced within normal 
index operations before Ruta can react. This invalidates information in 
internal Ruta annotations resulting finally in your problem. 

We will fix the problem in uimaj-core in this issue. Thus, I will change to 
focus a bit.

In the meantime, your workaround with a dummy RutaEngine is recommended. The 
first RutaEngine in the PEAR suffers from the invalid internal information, the 
second RutaEngine fixes this problem itself. 

> MARKFAST don't work when a Ruta 3 script runs in an AAE inside a PEAR context
> -----------------------------------------------------------------------------
>
>                 Key: UIMA-6367
>                 URL: https://issues.apache.org/jira/browse/UIMA-6367
>             Project: UIMA
>          Issue Type: Bug
>          Components: Ruta
>    Affects Versions: 3.0.1ruta, 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
>              Labels: RUTA
>             Fix For: 3.1.1ruta
>
>
> When an AAE runs in a PEAR context, and the first analysis engine is a Ruta 
> script with MARFAST (or MARKTABLE) actions, those actions don't work (same 
> situation after a CAS multiplier).
> The problem seems to be coming from {{RutaStream#moveToFirst}} when it's 
> called from {{TreeWordList.find}}; in that case, the underlying iterator is 
> not properly reset. It may be something related with the RutaStream 
> "bootstrapping"... I don't know :(
> If a new Ruta script (for instance, an empty script) is placed before the 
> "problematic" one, the problem with those MARKFAST/TABLE actions goes away. 
> Example here: [https://github.com/benisantos/ruta3-markfast-pear-bug]
> *Note*: with UIMA/Ruta 2.x this problem doesn't exist at all.
> h2.  



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

Reply via email to