Apache UIMA Ruta Guide and Reference - Apache UIMA - The ...
Apache UIMA Ruta Guide and Reference - Apache UIMA - The ...
Apache UIMA Ruta Guide and Reference - Apache UIMA - The ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
VOTE<br />
evaluates true, if the amount is within the passed interval. If no interval is passed, the condition<br />
always evaluates true.<br />
2.6.26.1. Definition:<br />
TOTALCOUNT(Type(,NumberExpression,NumberExpression(,Variable)?)?)<br />
2.6.26.2. Example:<br />
Paragraph{TOTALCOUNT(Keyword,1,10,var)->MARK(KeywordParagraph)};<br />
Here, the amount of Keyword annotations within the whole document is calculated <strong>and</strong> stored<br />
in the variable 'var'. If one to ten Keywords were counted, the Paragraph is marked with a<br />
KeywordParagraph annotation.<br />
2.6.27. VOTE<br />
<strong>The</strong> VOTE condition counts the annotations of the given two types within the window of the<br />
matched annotation <strong>and</strong> evaluates true, if it finds more annotations of the first type.<br />
2.6.27.1. Definition:<br />
VOTE(TypeExpression,TypeExpression)<br />
2.6.27.2. Example:<br />
Paragraph{VOTE(FirstName,LastName)};<br />
Here, this rule fires, if a paragraph contains more firstnames than lastnames.<br />
2.7. Actions<br />
2.7.1. ADD<br />
<strong>The</strong> ADD action adds all the elements of the passed <strong>Ruta</strong>Expressions to a given list. For example,<br />
this expressions could be a string, an integer variable or a list. For a complete overview on <strong>UIMA</strong><br />
<strong>Ruta</strong> expressions see Section 2.5, “Expressions” [26].<br />
2.7.1.1. Definition:<br />
ADD(ListVariable,(<strong>Ruta</strong>Expression)+)<br />
2.7.1.2. Example:<br />
Document{->ADD(list, var)};<br />
In this example, the variable 'var' is added to the list 'list'.<br />
<strong>UIMA</strong> <strong>Ruta</strong> Version 2.0.1 <strong>Apache</strong> <strong>UIMA</strong> <strong>Ruta</strong> Language 39