| <?xml version="1.0" encoding="iso-8859-1"?> | |
| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one | |
| or more contributor license agreements. See the NOTICE file | |
| distributed with this work for additional information | |
| regarding copyright ownership. The ASF licenses this file | |
| to you under the Apache License, Version 2.0 (the | |
| "License"); you may not use this file except in compliance | |
| with the License. You may obtain a copy of the License at | |
| https://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, | |
| software distributed under the License is distributed on an | |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| KIND, either express or implied. See the License for the | |
| specific language governing permissions and limitations | |
| under the License. | |
| --> | |
| <document> | |
| <properties> | |
| <title>Apache UIMA Ruta™</title> | |
| <author email="dev@uima.apache.org"> | |
| Apache UIMA Documentation Team</author> | |
| </properties> | |
| <body> | |
| <section name="Apache UIMA Ruta (Rule-based Text Annotation)"> | |
| <subsectionToc/> | |
| <subsection name='Overview' id="uima.ruta.overview"> | |
| <p> | |
| This Apache UIMA™ component consists of two major parts: An Analysis Engine, which interprets | |
| and executes the rule-based scripting language, and the Eclipse-based tooling (Workbench), | |
| which provides various support for developing rules. | |
| </p> | |
| <ul> | |
| <li> | |
| <p> | |
| This page only contains a short overview. A more detailed introduction can be found in the | |
| <a href="#uima.ruta.documentation">documentation</a> or in the | |
| <a href="downloads/gscl2013/2013-GSCL-Ruta.pdf">slides of the tutorial</a> in conjunction | |
| with GSCL 2013. | |
| </p> | |
| </li> | |
| <li> | |
| <p> | |
| The UIMA Ruta Workbench can be installed via our Eclipse update site: | |
| <a href="https://downloads.apache.org/uima/eclipse-update-site-v3/">https://downloads.apache.org/uima/eclipse-update-site-v3/</a> | |
| </p> | |
| <p> | |
| The UIMA Ruta Workbench 3.4.1 is tested with Eclipse 2023-09 (older versions may still work). | |
| </p> | |
| </li> | |
| </ul> | |
| </subsection> | |
| <subsection name='Rule Language' id="uima.ruta.language"> | |
| <p> | |
| The UIMA Ruta language is an imperative rule language extended with scripting elements. A rule defines a | |
| pattern of annotations with additional conditions. If this pattern applies, then the actions of the rule are performed | |
| on the matched annotations. A rule is composed of a sequence of rule elements and a rule element essentially consists of four parts: | |
| A matching condition, an optional quantifier, a list of conditions and a list of actions. | |
| The matching condition is typically a type of an annotation by which the rule element matches on the covered text of one of those annotations. | |
| The quantifier specifies, whether it is necessary that the rule element successfully matches and how often the rule element may match. | |
| The list of conditions specifies additional constraints that the matched text or annotations need to fulfill. The list of actions defines | |
| the consequences of the rule and often creates new annotations or modifies existing annotations. | |
| </p> | |
| <p> | |
| The following example rule consists of three rule elements. The first one (<code>ANY...</code>) matches on every token, which has a covered text that occurs in a word lists, named <code>MonthsList</code>. | |
| The second rule element (<code>PERIOD?</code>) is optional and does not need to be fulfilled, which is indicated by the quantifier <code>?</code>. The last rule element (<code>NUM...</code>) matches | |
| on numbers that fulfill the regular expression <code>REGEXP(".{2,4}"</code> and are therefore at least two characters to a maximum of four characters long. | |
| If this rule successfully matches on a text passage, then its three actions are executed: An annotation of the type <code>Month</code> is created for the first rule element, | |
| an annotation of the type <code>Year</code> is created for the last rule element and an annotation of the type <code>Date</code> | |
| is created for the span of all three rule elements. If the word list contains the correct entries, then this rule matches on strings like | |
| <code>Dec. 2004</code>, <code>July 85</code> or <code>11.2008</code> and creates the corresponding annotations. | |
| <pre>ANY{INLIST(MonthsList) -> MARK(Month), MARK(Date,1,3)} | |
| PERIOD? NUM{REGEXP(".{2,4}") -> MARK(Year)};</pre> | |
| </p> | |
| <p> | |
| Here is a short overview of additional features of the rule language: | |
| </p> | |
| <ul> | |
| <li>Expressions and variables</li> | |
| <li>Import and execution of external components</li> | |
| <li>Flexible matching with filtering</li> | |
| <li>Modularization in different files or blocks</li> | |
| <li>Control structures, e.g., for windowing</li> | |
| <li>Score-based extraction</li> | |
| <li>Modification</li> | |
| <li>Html support</li> | |
| <li>Dictionaries</li> | |
| <li>Extensible language definition</li> | |
| </ul> | |
| </subsection> | |
| <subsection name='Workbench' id="uima.ruta.workbench"> | |
| <p> | |
| The UIMA Ruta Workbench was created to facilitate all steps in creating Analysis Engines based on the UIMA Ruta language. | |
| Here is a short overview of included features: | |
| </p> | |
| <ul> | |
| <li> | |
| <p> | |
| <b>Editing support:</b> The full-featured editor for the UIMA Ruta language provides syntax and semantic highlighting, | |
| syntax checking, context-sensitive auto-completion, template-based completion, open declaration and more. | |
| </p> | |
| </li> | |
| <li> | |
| <p> | |
| <b>Rule Explanation:</b> Each step in the matching process can be explained: This includes how often a rule was applied, | |
| which condition was not fulfilled, or by which rule a specific annotation was created. Additionally, profile information | |
| about the runtime performance can be accessed. | |
| </p> | |
| </li> | |
| <li> | |
| <p> | |
| <b>Automatic Validation:</b> UIMA Ruta scripts can automatically validated against a set of annotated documents (F1 score, test-driven development) | |
| and even against unlabeled documents (constraint-driven evaluation). | |
| </p> | |
| </li> | |
| <li> | |
| <p> | |
| <b>Rule learning:</b> The supervised learning algorithms of the included TextRuler framework are able to induce rules | |
| and, therefore, enable semi-automatic development of rule-based components. | |
| </p> | |
| </li> | |
| <li> | |
| <p> | |
| <b>Query:</b> Rules can be used as query statements in order to investigate annotated documents. | |
| </p> | |
| </li> | |
| </ul> | |
| <img style="width: 75%; height: 75%" src="./images/ruta/ruta_workbench.png" alt="UIMA Ruta Workbench"/> | |
| </subsection> | |
| <subsection name='Documentation' id="uima.ruta.documentation"> | |
| <p> | |
| Here, you can find the documentation for the most recent UIMA Ruta release. | |
| </p> | |
| <p><b>Latest UIMA Ruta documentation</b></p> | |
| <ul> | |
| <li><a href="d/ruta-current/ruta.html">Apache UIMA Ruta Guide and Reference (v3.x)</a></li> | |
| <li><a href="d/ruta-current/RELEASE_NOTES.html">Latest release notes (v3.x)</a></li> | |
| </ul> | |
| <p>Should you require documentation for a specific version of uimaFIT, please check our <a href="https://svn.apache.org/repos/asf/uima/site/archive/docs/d">archive</a>.</p> | |
| </subsection> | |
| <subsection name='Developer Information' id="uima.ruta.developer"> | |
| <p>The latest version of UIMA Ruta is available via <a href="https://search.maven.org/#search%7Cga%7C1%7Cruta">Maven Central</a>. | |
| If you use Maven as your build tool, then you can add the basic UIMA Ruta functionality as a dependency | |
| in your pom.xml file (additionally to other UIMA dependencies)</p> | |
| <pre> | |
| <dependency> | |
| <groupId>org.apache.uima</groupId> | |
| <artifactId>ruta-core</artifactId> | |
| <version>3.4.1</version> | |
| </dependency> | |
| </pre> | |
| <subsubsection> | |
| For building the UIMA Ruta projects from sources, follow the instructions for <a href="building-uima.html">building UIMA</a>, | |
| but exchange the command for SVN checkout:<br/> | |
| <code>svn checkout https://svn.apache.org/repos/asf/uima/ruta/trunk c:/myWorkingDirectory</code> | |
| </subsubsection> | |
| <p> | |
| The sources of the current release are available at the <a href="downloads.cgi">download page</a>. | |
| </p> | |
| </subsection> | |
| <subsection name='Reference' id="uima.ruta.reference"> | |
| <p> | |
| If you use UIMA Ruta to support academic research, then please consider citing the following | |
| paper as appropriate:</p> | |
| <pre>@article{NLE:10051335, | |
| author = {Kluegl, Peter and Toepfer, Martin and Beck, Philip-Daniel and Fette, Georg and Puppe, Frank}, | |
| title = {UIMA Ruta: Rapid development of rule-based information extraction applications}, | |
| journal = {Natural Language Engineering}, | |
| volume = {22}, | |
| issue = {01}, | |
| month = {1}, | |
| year = {2016}, | |
| issn = {1469-8110}, | |
| pages = {1--40}, | |
| numpages = {40}, | |
| doi = {10.1017/S1351324914000114}, | |
| URL = {https://journals.cambridge.org/article_S1351324914000114}, | |
| } | |
| </pre> | |
| </subsection> | |
| </section> | |
| </body> | |
| </document> |