20.08.2013 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.6.15. NEAR<br />

NEAR<br />

<strong>The</strong> NEAR condition is fulfilled, if the distance of the matched annotation to an annotation of<br />

the given type is within a given interval. <strong>The</strong> direction is defined by a boolean parameter, whose<br />

default value is set to true, therefore searching forward. By default this condition works on an<br />

unfiltered index. An optional fifth boolean parameter can be set to true to get the condition being<br />

evaluated on a filtered index.<br />

2.6.15.1. Definition:<br />

NEAR(TypeExpression,NumberExpression,NumberExpression<br />

(,BooleanExpression(,BooleanExpression)?)?)<br />

2.6.15.2. Example:<br />

2.6.16. NOT<br />

Paragraph{NEAR(Headline,0,10,false)->MARK(NoHeadline)};<br />

A Paragraph that starts at most ten tokens after a Headline annotation is annotated with the<br />

NoHeadline annotation.<br />

<strong>The</strong> NOT condition negates the result of its contained condition.<br />

2.6.16.1. Definition:<br />

"-"Condition<br />

2.6.16.2. Example:<br />

2.6.17. OR<br />

Paragraph{-PARTOF(Headline)->MARK(Headline)};<br />

A Paragraph that is not part of a Headline annotation so far is annotated with a Headline annotation.<br />

<strong>The</strong> OR Condition is a composed condition <strong>and</strong> evaluates true, if at least one contained condition is<br />

evaluated true.<br />

2.6.17.1. Definition:<br />

OR(Condition1,...,ConditionN)<br />

2.6.17.2. Example:<br />

Paragraph{OR(PARTOF(Headline),CONTAINS(Keyword))<br />

->MARK(ImportantParagraph)};<br />

In this example a Paragraph is annotated with the ImportantParagraph annotation, if it is a Headline<br />

or contains Keyword annotations.<br />

<strong>UIMA</strong> <strong>Ruta</strong> Version 2.0.1 <strong>Apache</strong> <strong>UIMA</strong> <strong>Ruta</strong> Language 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!