Hi,

I am currently trying the Ruta workbench and I would like to know if it is 
possible to refer to annotations put by an engine from a script.

Here is a simple example: I want to analyze an html document and I would like 
to mark all the links inside the document. I write this script:

ENGINE utils.HtmlAnnotator;

TYPESYSTEM utils.HtmlTypeSystem;
DECLARE Link;

Document{-> EXEC(HtmlAnnotator)};

org.apache.uima.ruta.type.html.A {-> MARK(Link)};

I test with the following input:

<html>
        <body>
                <ul>
                        <li><a href="#">Link 1</a></li>
                        <li><a href="#">Link 2</a></li>
                </ul>
                
                <p><a href="#">Link 3</a></li></p>
        </body>
</html>

In the output, I expected to find 3 "Link" annotations but I obtained none. 
However, the output file contains the "org.apache.uima.ruta.type.html.A" 
annotations as expected.

I didn't find how to use the annotations put by an engine on the document in 
the remaining of my script.

I conclude that the Document object annotated by the engine is not accessible 
from the script after executing this engine.

Is this possible to do such an operation in RUTA scripts ?

Thank you for your help.

Best regards,
Fouad

Reply via email to