You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2019/02/24 21:29:51 UTC

svn commit: r1854282 [2/5] - in /uima/site/trunk/uima-website: docs/ docs/d/ruta-2.7.0/ docs/d/ruta-2.7.0/css/ docs/d/ruta-2.7.0/images/ docs/d/ruta-2.7.0/images/tools/ docs/d/ruta-2.7.0/images/tools/ruta/ docs/d/ruta-2.7.0/images/tools/ruta/language/ ...

Added: uima/site/trunk/uima-website/docs/d/ruta-2.7.0/tools.ruta.book.html
URL: http://svn.apache.org/viewvc/uima/site/trunk/uima-website/docs/d/ruta-2.7.0/tools.ruta.book.html?rev=1854282&view=auto
==============================================================================
--- uima/site/trunk/uima-website/docs/d/ruta-2.7.0/tools.ruta.book.html (added)
+++ uima/site/trunk/uima-website/docs/d/ruta-2.7.0/tools.ruta.book.html Sun Feb 24 21:29:51 2019
@@ -0,0 +1,8167 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>Apache UIMA Ruta&#8482; Guide and Reference</title><link rel="stylesheet" type="text/css" href="css/stylesheet-html.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="Apache UIMA Ruta&#8482; Guide and Reference" id="d5e1"><div xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div><h1 class="title">Apache UIMA Ruta&#8482; Guide and Reference</h1></div><div><div class="authorgroup">
+      <h3 class="corpauthor">Written and maintained by the Apache UIMA Development Community</h3>
+    </div></div><div><p class="releaseinfo">Version 2.7.0</p></div><div><p class="copyright">Copyright &copy; 2011, 2019 The Apache Software Foundation</p></div><div><div class="legalnotice" title="Legal Notice"><a name="d5e8"></a>
+      <p> </p>
+      <p title="License and Disclaimer">
+        <b>License and Disclaimer.&nbsp;</b>
+
+        The ASF licenses this documentation
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this documentation except in compliance
+           with the License.  You may obtain a copy of the License at
+         
+         </p><div class="blockquote"><blockquote class="blockquote">
+           <a class="ulink" href="http://www.apache.org/licenses/LICENSE-2.0" target="_top">http://www.apache.org/licenses/LICENSE-2.0</a>
+         </blockquote></div><p title="License and Disclaimer">
+         
+           Unless required by applicable law or agreed to in writing,
+           this documentation and its contents are distributed under the License 
+           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.
+         
+      </p>
+      <p> </p>
+      <p> </p>
+      <p title="Trademarks">
+        <b>Trademarks.&nbsp;</b>
+        All terms mentioned in the text that are known to be trademarks or 
+        service marks have been appropriately capitalized.  Use of such terms
+        in this book should not be regarded as affecting the validity of the
+        the trademark or service mark.
+        
+      </p>
+    </div></div><div><p class="pubdate">February, 2019</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#ugr.tools.ruta.overview">1. Apache UIMA Ruta Overview</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.overview.intro">1.1. What is Apache UIMA Ruta?</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.overview.gettingstarted">1.2. Getting started</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.overview.coreconcepts">1.3. Core Concepts</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.overview.examples">1.4. Learning by Example</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae">1.5. UIMA Analysis Engines</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.ae.basic">1.5.1. Ruta Engine</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.annotationwriter">1.5.2. Annotation Writer</a></span></
 dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.plaintext">1.5.3. Plain Text Annotator</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.modifier">1.5.4. Modifier</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.html">1.5.5. HTML Annotator</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.htmlconverter">1.5.6. HTML Converter</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.stylemap">1.5.7. Style Map Creator</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.cutter">1.5.8. Cutter</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.view">1.5.9. View Writer</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.xmi">1.5.10. XMI Writer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#ugr.tools.ruta.language.language">2. Apache UIMA Ruta Language</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.synt
 ax">2.1. Syntax</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.anchoring">2.2. Rule elements and their matching order</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.seeding">2.3. Basic annotations and tokens</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier">2.4. Quantifiers</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.sg">2.4.1. * Star Greedy</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.sr">2.4.2. *? Star Reluctant</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.pg">2.4.3. + Plus Greedy</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.pr">2.4.4. +? Plus Reluctant</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.qg">2.4.5. ? Question Greedy</a></span></dt><dt><span class="section"><a href="#ugr
 .tools.ruta.language.quantifier.qr">2.4.6. ?? Question Reluctant</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.mmg">2.4.7. [x,y] Min Max Greedy</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.quantifier.mmr">2.4.8. [x,y]? Min Max Reluctant</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.declarations">2.5. Declarations</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.declarations.type">2.5.1. Types</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.declarations.variable">2.5.2. Variables</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.declarations.ressource">2.5.3. Resources</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.declarations.scripts">2.5.4. Scripts</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.declarations.components">2.5.5. Componen
 ts</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions">2.6. Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions.type">2.6.1. Type Expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions.number">2.6.2. Number Expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions.string">2.6.3. String Expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions.boolean">2.6.4. Boolean Expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions.lists">2.6.5. List Expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.expressions.features">2.6.6. Feature Expressions</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions">2.7. Conditions</a></span></dt><dd><dl><dt><span c
 lass="section"><a href="#ugr.tools.ruta.language.conditions.after">2.7.1. AFTER</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.and">2.7.2. AND</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.before">2.7.3. BEFORE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.contains">2.7.4. CONTAINS</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.contextcount">2.7.5. CONTEXTCOUNT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.count">2.7.6. COUNT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.currentcount">2.7.7. CURRENTCOUNT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.endswith">2.7.8. ENDSWITH</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.feature">2.7.9. FEATURE</a></span></dt><dt><span cl
 ass="section"><a href="#ugr.tools.ruta.language.conditions.if">2.7.10. IF</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.inlist">2.7.11. INLIST</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.is">2.7.12. IS</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.last">2.7.13. LAST</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.mofn">2.7.14. MOFN</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.near">2.7.15. NEAR</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.not">2.7.16. NOT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.or">2.7.17. OR</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.parse">2.7.18. PARSE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.p
 artof">2.7.19. PARTOF</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.partofneq">2.7.20. PARTOFNEQ</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.position">2.7.21. POSITION</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.regexp">2.7.22. REGEXP</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.score">2.7.23. SCORE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.size">2.7.24. SIZE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.startswith">2.7.25. STARTSWITH</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.totalcount">2.7.26. TOTALCOUNT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.conditions.vote">2.7.27. VOTE</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.ac
 tions">2.8. Actions</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.add">2.8.1. ADD</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.addfiltertype">2.8.2. ADDFILTERTYPE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.addretaintype">2.8.3. ADDRETAINTYPE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.assign">2.8.4. ASSIGN</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.call">2.8.5. CALL</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.clear">2.8.6. CLEAR</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.color">2.8.7. COLOR</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.configure">2.8.8. CONFIGURE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.create">2.8.9. CREATE</a><
 /span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.del">2.8.10. DEL</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.dynamicanchoring">2.8.11. DYNAMICANCHORING</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.exec">2.8.12. EXEC</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.fill">2.8.13. FILL</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.filtertype">2.8.14. FILTERTYPE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.gather">2.8.15. GATHER</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.get">2.8.16. GET</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.getfeature">2.8.17. GETFEATURE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.getlist">2.8.18. GETLIST</a></span></dt><dt><span clas
 s="section"><a href="#ugr.tools.ruta.language.actions.greedyanchoring">2.8.19. GREEDYANCHORING</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.log">2.8.20. LOG</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.mark">2.8.21. MARK</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.markfast">2.8.22. MARKFAST</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.markfirst">2.8.23. MARKFIRST</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.marklast">2.8.24. MARKLAST</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.markonce">2.8.25. MARKONCE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.markscore">2.8.26. MARKSCORE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.marktable">2.8.27. MARKTABLE</a></span></dt><dt><span class="se
 ction"><a href="#ugr.tools.ruta.language.actions.matchedtext">2.8.28. MATCHEDTEXT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.merge">2.8.29. MERGE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.remove">2.8.30. REMOVE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.removeduplicate">2.8.31. REMOVEDUPLICATE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.removefiltertype">2.8.32. REMOVEFILTERTYPE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.removeretaintype">2.8.33. REMOVERETAINTYPE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.replace">2.8.34. REPLACE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.retaintype">2.8.35. RETAINTYPE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.setfeature">2.8.36. SETF
 EATURE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.shift">2.8.37. SHIFT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.split">2.8.38. SPLIT</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.transfer">2.8.39. TRANSFER</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.trie">2.8.40. TRIE</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.trim">2.8.41. TRIM</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.unmark">2.8.42. UNMARK</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.actions.unmarkall">2.8.43. UNMARKALL</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.filtering">2.9. Robust extraction using filtering</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.wildcard">2.10. Wildcard #</a></span></d
 t><dt><span class="section"><a href="#ugr.tools.ruta.language.optional">2.11. Optional match _</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.labels">2.12. Label expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.blocks">2.13. Blocks</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.blocks.block">2.13.1. BLOCK</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.blocks.foreach">2.13.2. FOREACH</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.inlined">2.14. Inlined rules</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.macro">2.15. Macros for conditions and actions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.score">2.16. Heuristic extraction using scoring rules</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.modification">2.17. Modification</a></spa
 n></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.external_resources">2.18. External resources</a></span></dt><dd><dl><dt><span class="section"><a href="#d5e2569">2.18.1. WORDLISTs</a></span></dt><dt><span class="section"><a href="#d5e2591">2.18.2. WORDTABLEs</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.language.regexprule">2.19. Simple Rules based on Regular Expressions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.extensions">2.20. Language Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.language.extensions.core-ext">2.20.1. Provided Extensions</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.language.extensions.new">2.20.2. Adding new Language Elements</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#ugr.tools.ruta.workbench">3. Apache UIMA Ruta Workbench</a></span></dt><dd><dl><dt><span class="section"><a href="#section.ugr.tool
 s.ruta.workbench.install">3.1. Installation</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.overview">3.2. UIMA Ruta Workbench Overview</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.projects">3.3. UIMA Ruta Projects</a></span></dt><dd><dl><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.projects.create_projects">3.3.1. UIMA Ruta create project wizard</a></span></dt></dl></dd><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.ruta_perspective">3.4. UIMA Ruta Perspective</a></span></dt><dd><dl><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.ruta_perspective.annotation_browser">3.4.1. Annotation Browser</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.ruta_perspective.selection">3.4.2. Selection</a></span></dt></dl></dd><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective">3.5. UIMA Ru
 ta Explain Perspective</a></span></dt><dd><dl><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.applied_rules">3.5.1. Applied Rules</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.matched_and_failed_rules">3.5.2. Matched Rules and Failed Rules</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.rule_elements">3.5.3. Rule Elements</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.covering_rules">3.5.4. Covering Rules</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.rule_list">3.5.5. Rule List</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.created_by">3.5.6. Created By</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.explain_perspective.statis
 tics">3.5.7. Statistics</a></span></dt></dl></dd><dt><span class="section"><a href="#section.tools.ruta.workbench.cde">3.6. UIMA Ruta CDE perspective</a></span></dt><dd><dl><dt><span class="section"><a href="#section.tools.ruta.workbench.cde.documents">3.6.1. CDE Documents view</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.workbench.cde.constraints">3.6.2. CDE Constraints view</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.workbench.cde.result">3.6.3. CDE Result view</a></span></dt></dl></dd><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.ruta_query">3.7. Ruta Query View</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.testing">3.8. Testing</a></span></dt><dd><dl><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.testing.usage">3.8.1. Usage</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.testing.evaluators">3.8.2. Evaluators</a>
 </span></dt></dl></dd><dt><span class="section"><a href="#section.tools.ruta.workbench.textruler">3.9. TextRuler</a></span></dt><dd><dl><dt><span class="section"><a href="#section.tools.ruta.workbench.textruler.learner">3.9.1. Included rule learning algorithms</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.workbench.textruler.ui">3.9.2. The TextRuler view</a></span></dt></dl></dd><dt><span class="section"><a href="#section.tools.ruta.workbench.check">3.10. Check Annotations view</a></span></dt><dt><span class="section"><a href="#section.ugr.tools.ruta.workbench.create_dictionaries">3.11. Creation of Tree Word Lists</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.workbench.apply">3.12. Apply a UIMA Ruta script to a folder</a></span></dt></dl></dd><dt><span class="chapter"><a href="#ugr.tools.ruta.howtos">4. Apache UIMA Ruta HowTos</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.ae.basic.apply">4.1. Apply UIMA Ruta Ana
 lysis Engine in plain Java</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.integration">4.2. Integrating UIMA Ruta in an existing UIMA Annotator</a></span></dt><dd><dl><dt><span class="section"><a href="#ugr.tools.ruta.ae.integration.mvn">4.2.1. Adding Ruta to our Annotator</a></span></dt><dt><span class="section"><a href="#ugr.tools.ruta.ae.integration.loading">4.2.2. Developing Ruta rules and applying them from inside Java code
+			</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.maven">4.3. UIMA Ruta Maven Plugin</a></span></dt><dd><dl><dt><span class="section"><a href="#d5e3495">4.3.1. generate goal</a></span></dt><dt><span class="section"><a href="#d5e3500">4.3.2. twl goal</a></span></dt><dt><span class="section"><a href="#d5e3504">4.3.3. mtwl goal</a></span></dt></dl></dd><dt><span class="section"><a href="#ugr.tools.ruta.archetype">4.4. UIMA Ruta Maven Archetype</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.workbench.textruler.example">4.5. Induce rules with the TextRuler framework</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.howto.html">4.6. HTML annotations in plain text</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.howto.sorter">4.7. Sorting files with UIMA Ruta</a></span></dt><dt><span class="section"><a href="#section.tools.ruta.howto.xml">4.8. Converting XML documents with UIMA Ruta</a></span></dt
 ></dl></dd></dl></div>
+  
+  
+    
+  
+  
+  <div class="chapter" title="Chapter&nbsp;1.&nbsp;Apache UIMA Ruta Overview" id="ugr.tools.ruta.overview"><div class="titlepage"><div><div><h2 class="title">Chapter&nbsp;1.&nbsp;Apache UIMA Ruta Overview</h2></div></div></div>
+  
+  <p>
+   
+  </p>
+  <div class="section" title="1.1.&nbsp;What is Apache UIMA Ruta?"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ugr.tools.ruta.overview.intro">1.1.&nbsp;What is Apache UIMA Ruta?</h2></div></div></div>
+    
+    <p>
+      Apache UIMA Ruta&#8482; is a rule-based script language supported by Eclipse-based tooling.
+      The language is designed to enable rapid development of text processing applications within Apache UIMA&#8482;. 
+      A special focus lies on the intuitive and flexible domain specific language for defining 
+      patterns of annotations. Writing rules for information extraction or other text processing 
+      applications is a tedious process. The Eclipse-based tooling for UIMA Ruta, called the Apache UIMA Ruta Workbench,
+      was created to support the user and to facilitate every step when writing UIMA Ruta rules. Both the 
+      Ruta rule language and the UIMA Ruta Workbench integrate smoothly with Apache UIMA.
+    </p>
+  </div>
+  
+  <div class="section" title="1.2.&nbsp;Getting started"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ugr.tools.ruta.overview.gettingstarted">1.2.&nbsp;Getting started</h2></div></div></div>
+    
+    <p>
+      This section gives a short roadmap how to read the documentation and gives some recommendations how to 
+      start developing UIMA Ruta-based applications. This documentation assumes that the reader knows about 
+      the core concepts of Apache UIMA. Knowledge of the meaning and usage of the terms <span class="quote">&#8220;<span class="quote">CAS</span>&#8221;</span>, 
+      <span class="quote">&#8220;<span class="quote">Feature Structure</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">Annotation</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">Type</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">Type System</span>&#8221;</span> 
+      and <span class="quote">&#8220;<span class="quote">Analysis Engine</span>&#8221;</span> is required. Please refer to the documentation of Apache UIMA for an introduction.
+    </p>
+    <p>  
+      Unexperienced users that want to learn about UIMA Ruta can start with the next two sections: 
+      <a class="xref" href="#ugr.tools.ruta.overview.coreconcepts" title="1.3.&nbsp;Core Concepts">Section&nbsp;1.3, &#8220;Core Concepts&#8221;</a>
+      gives a short overview of the core ideas and features of the UIMA Ruta language and Workbench. 
+      This section introduces the main concepts of the UIMA Ruta language. It explains how UIMA Ruta rules 
+      are composed and applied, and discusses the advantages of the UIMA Ruta system.
+      The following <a class="xref" href="#ugr.tools.ruta.overview.examples" title="1.4.&nbsp;Learning by Example">Section&nbsp;1.4, &#8220;Learning by Example&#8221;</a> approaches the UIMA Ruta language using a different
+      perspective. Here, the language is introduced by examples. The first example starts with explaining how a simple rule
+      looks like, and each following example extends the syntax or semantics of the UIMA Ruta language. 
+      After the consultation of these two sections, the reader is expected to have gained enough 
+      knowledge to start writing her first UIMA Ruta-based application.
+    </p>  
+    <p>
+      The UIMA Ruta Workbench was created to support the user and to facilitate the development process. It is strongly recommended to 
+      use this Eclipse-based IDE since it, for example, automatically configures the component descriptors and provides editing support like
+      syntax checking. <a class="xref" href="#section.ugr.tools.ruta.workbench.install" title="3.1.&nbsp;Installation">Section&nbsp;3.1, &#8220;Installation&#8221;</a> describes how the UIMA Ruta Workbench is installed.
+      UIMA Ruta rules can also be applied on CAS without using the UIMA Ruta Workbench. 
+      <a class="xref" href="#ugr.tools.ruta.ae.basic.apply" title="4.1.&nbsp;Apply UIMA Ruta Analysis Engine in plain Java">Section&nbsp;4.1, &#8220;Apply UIMA Ruta Analysis Engine in plain Java&#8221;</a> contains examples how to execute UIMA Ruta rules in plain java.
+      A good way to get started with UIMA Ruta is to play around with an exemplary UIMA Ruta project, e.g., 
+      <span class="quote">&#8220;<span class="quote">ExampleProject</span>&#8221;</span> in the example-projects of the UIMA Ruta source release.
+      This UIMA Ruta project contains some simple rules for processing citation metadata.
+    </p>  
+    <p>    
+      <a class="xref" href="#ugr.tools.ruta.language.language" title="Chapter&nbsp;2.&nbsp;Apache UIMA Ruta Language">Chapter&nbsp;2, <i>Apache UIMA Ruta Language</i></a> and <a class="xref" href="#ugr.tools.ruta.workbench" title="Chapter&nbsp;3.&nbsp;Apache UIMA Ruta Workbench">Chapter&nbsp;3, <i>Apache UIMA Ruta Workbench</i></a> provide 
+      more detailed descriptions and can be referred to in order to gain knowledge of specific parts 
+      of the UIMA Ruta language or the UIMA Ruta Workbench.    
+    </p>  
+  </div>
+  
+  <div class="section" title="1.3.&nbsp;Core Concepts"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ugr.tools.ruta.overview.coreconcepts">1.3.&nbsp;Core Concepts</h2></div></div></div>
+    
+    <p>
+      The UIMA Ruta language is an imperative rule language extended with scripting elements. A UIMA Ruta 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 consist 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. 
+      They are only applied if all rule elements of the rule have successfully matched. Examples for UIMA Ruta rules can be found in 
+      <a class="xref" href="#ugr.tools.ruta.overview.examples" title="1.4.&nbsp;Learning by Example">Section&nbsp;1.4, &#8220;Learning by Example&#8221;</a>.
+    </p>
+    <p>
+      When UIMA Ruta rules are applied on a document, respectively on a CAS, then they are always grouped in a script file. However, a UIMA Ruta
+      script file does not only contain rules, but also other statements. First of all, each script file starts with a package declaration followed by
+      a list of optional imports. Then, common statements like rules, type declarations or blocks build the body and functionality of a script.
+      <a class="xref" href="#ugr.tools.ruta.ae.basic.apply" title="4.1.&nbsp;Apply UIMA Ruta Analysis Engine in plain Java">Section&nbsp;4.1, &#8220;Apply UIMA Ruta Analysis Engine in plain Java&#8221;</a> gives an example, how UIMA Ruta scripts can be applied in plain Java.
+      UIMA Ruta script files are naturally organized in UIMA Ruta projects, which is a concept of the UIMA Ruta Workbench. 
+      The structure of a UIMA Ruta project is described in <a class="xref" href="#section.ugr.tools.ruta.workbench.projects" title="3.3.&nbsp;UIMA Ruta Projects">Section&nbsp;3.3, &#8220;UIMA Ruta Projects&#8221;</a>
+    </p>
+    <p>
+      The inference of UIMA Ruta rules, that is the approach how the rules are applied, can be described as imperative depth-first matching.
+      In contrast to similar rule-based systems, UIMA Ruta rules are applied in the order they are defined in the script.
+      The imperative execution of the matching rules may have disadvantages, but also many advantages like an increased rate of development or 
+      an easier explanation. The second main property of the UIMA Ruta inference is the depth-first matching. When a rule matches on a pattern of annotations, then
+      an alternative is always tracked until it has matched or failed before the next alternative is considered. The behavior of a rule may change, if 
+      it has already matched on an early alternative and thus has performed an action, which influences some constraints of the rule.
+      Examples, how UIMA Ruta rules are applied, are given in <a class="xref" href="#ugr.tools.ruta.overview.examples" title="1.4.&nbsp;Learning by Example">Section&nbsp;1.4, &#8220;Learning by Example&#8221;</a>.
+    </p>
+    <p>
+      The UIMA Ruta language provides the possibility to approach an annotation problem in different ways. Let us distinguish 
+      some approaches as an example.
+      It is common in the UIMA Ruta language to create many annotations of different types. These annotations are probably not the targeted annotation of the domain,
+      but can be helpful to incrementally approximate the annotation of interest. This enables the user to work <span class="quote">&#8220;<span class="quote">bottom-up</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">top-down</span>&#8221;</span>.
+      In the former approach, the rules add incrementally more complex annotations using simple ones until the target annotation can be created.
+      In the latter approach, the rules get more specific while partitioning the document in smaller segments, which result in the targeted annotation, eventually.
+      By using many <span class="quote">&#8220;<span class="quote">helper</span>&#8221;</span>-annotations, the engineering task becomes easier and more comprehensive.
+      The UIMA Ruta language provides distinctive language elements for different tasks. There are, for example, actions 
+      that are able to create new annotations, actions that are able to remove annotations and actions that are able to modify the
+      offsets of annotations. This enables, amongst other things, a transformation-based approach. The user starts by creating general rules that are able to
+      annotate most of the text fragments of interest. Then, instead of making these rules more complex by adding more conditions for situations where they fail,
+      additional rules are defined that correct the mistakes of the general rules, e.g., by deleting false positive annotations.
+      <a class="xref" href="#ugr.tools.ruta.overview.examples" title="1.4.&nbsp;Learning by Example">Section&nbsp;1.4, &#8220;Learning by Example&#8221;</a> provides some examples how UIMA Ruta rules can be engineered.
+    </p>
+    <p>
+      To write rules manually is a tedious and error-prone process. The <a class="link" href="#ugr.tools.ruta.workbench" title="Chapter&nbsp;3.&nbsp;Apache UIMA Ruta Workbench">UIMA Ruta Workbench</a>
+      was developed to facilitate writing rules by providing as much tooling support as possible. This includes, for example, syntax checking and auto completion, which
+      make the development less error-prone. The user can annotate documents and use these documents as unit tests for test-driven development or 
+      quality maintenance. Sometimes, it is necessary to debug the rules because they do not match as expected. In this case, the explanation perspective provides views
+      that explain every detail of the matching process. Finally, the UIMA Ruta language can also be used by the tooling, for example, by the <span class="quote">&#8220;<span class="quote">Query</span>&#8221;</span> view.
+      Here, UIMA Ruta rules can be used as query statements in order to investigate annotated documents.
+    </p>
+    <p>
+      UIMA Ruta smoothly integrates with Apache UIMA. First of all, the UIMA Ruta rules are applied using a generic Analysis Engine and thus UIMA Ruta scripts can 
+      easily be added to Apache UIMA pipelines. UIMA Ruta also provides the functionality to import and use other UIMA components like Analysis Engines and Type Systems.
+      UIMA Ruta rules can refer to every type defined in an imported type system, and the UIMA Ruta Workbench generates a type system descriptor file containing all 
+      types that were defined in a script file. Any Analysis Engine can be executed by rules as long as their implementation is available in the classpath. Therefore,
+      functionality outsourced in an arbitrary Analysis Engine can be added and used within UIMA Ruta.
+    </p>
+  </div>
+  
+  <div class="section" title="1.4.&nbsp;Learning by Example"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ugr.tools.ruta.overview.examples">1.4.&nbsp;Learning by Example</h2></div></div></div>
+    
+    <p>
+      This section gives an introduction to the UIMA Ruta language by explaining the rule syntax 
+      and inference with some simplified examples. It is recommended to use the UIMA Ruta Workbench to write UIMA Ruta rules
+      in order to gain advantages like syntax checking. A short description how to install the UIMA Ruta Workbench 
+      is given <a class="link" href="#section.ugr.tools.ruta.workbench.install" title="3.1.&nbsp;Installation">here</a>. The following examples make use of the 
+      annotations added by the default seeding of the UIMA Ruta Analysis Engine. Their meaning is explained along with the examples. 
+    </p>
+    <p>
+      The first example consists of a declaration of a type followed by a simple rule. Type declarations always start with the keyword 
+      <span class="quote">&#8220;<span class="quote">DECLARE</span>&#8221;</span> followed by the short name of the new type. The namespace of the type is equal to the package declaration of the script file.
+      If there is no package declaration, then the types declared in the script file have no namespace.
+      There is also the possibility to create more complex types with features or specific parent types, but this will be neglected for now.
+      In the example, a simple annotation type with the short name <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span> is defined.
+      After the declaration of the type, a rule with one rule element is given. 
+      UIMA Ruta rules in general can consist of a sequence of rule elements. Simple rule elements themselves consist of four parts: A matching condition,
+      an optional quantifier, an optional list of conditions and an optional list of actions. The rule element in the 
+      following example has a matching condition <span class="quote">&#8220;<span class="quote">W</span>&#8221;</span>, an annotation type standing for normal words. 
+      Statements like declarations and rules always end with a semicolon. 
+    </p>
+    
+    <pre class="programlisting">DECLARE Animal;
+W{REGEXP("dog") -&gt; MARK(Animal)};</pre>
+
+    <p>
+      The rule element also contains one condition and one action, both surrounded by curly parentheses. In order to distinguish conditions from actions
+      they are separated by <span class="quote">&#8220;<span class="quote">-&gt;</span>&#8221;</span>. The condition <span class="quote">&#8220;<span class="quote">REGEXP("dog")</span>&#8221;</span> indicates that the matched 
+      word must match the regular expression <span class="quote">&#8220;<span class="quote">dog</span>&#8221;</span>. If the matching condition and the additional regular expression are fulfilled, then the action
+      is executed, which creates a new annotation of the type <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span> with the same offsets as the matched token.
+      The default seeder does actually not add annotations of the type <span class="quote">&#8220;<span class="quote">W</span>&#8221;</span>, but annotations of the types <span class="quote">&#8220;<span class="quote">SW</span>&#8221;</span> and 
+      <span class="quote">&#8220;<span class="quote">CW</span>&#8221;</span> for small written words and capitalized words, which both have the parent type <span class="quote">&#8220;<span class="quote">W</span>&#8221;</span>.
+    </p>
+    
+    <p>
+      There is also the possibility to add implicit actions and conditions, which have no explicit name, but consist only of an expression.
+      In the part of the conditions, boolean expressions and feature match expression can be applied, and in the part of the actions,
+      type expressions and feature assignment expression can be added. The following example contains one implicit condition and one implicit action.
+      The additional condition is a boolean expression (boolean variable), which is set to <span class="quote">&#8220;<span class="quote">true</span>&#8221;</span>, and therefore is always fulfills the condition.
+      The <span class="quote">&#8220;<span class="quote">MARK</span>&#8221;</span> action was replaced by a type expression, which refer to the type <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span>. The following rule shows, therefore,
+      the same behavior as the rule in the last example.
+    </p>
+    
+    <pre class="programlisting">DECLARE Animal;
+BOOLEAN active = true;
+W{REGEXP("dog"), active -&gt; Animal};</pre>
+    
+    <p>
+      There is also a special kind of rules, which follow a different syntax and semantic, and enables a simplified creation of annotations based on regular expression.
+      The following rule, for example, creates an <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span> annotation for each occurrence of <span class="quote">&#8220;<span class="quote">dog</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">cat</span>&#8221;</span>.
+    </p>
+    
+    <pre class="programlisting">DECLARE Animal;
+"dog|cat" -&gt; Animal;</pre>
+    
+    <p>
+      Since it is tedious to create Animal annotations by matching on different regular expression, we apply an external dictionary in the next example.
+      The first line defines a word list named <span class="quote">&#8220;<span class="quote">AnimalsList</span>&#8221;</span>, which is located in the resource folder (the file <span class="quote">&#8220;<span class="quote">Animals.txt</span>&#8221;</span> 
+      contains one animal name in each line). After the declaration of the type, a rule uses this word list to find all occurrences of animals
+      in the complete document.
+    </p>
+
+    <pre class="programlisting">WORDLIST AnimalsList = 'Animals.txt';
+DECLARE Animal;
+Document{-&gt; MARKFAST(Animal, AnimalsList)};
+</pre>
+    
+    <p>
+      The matching condition of the rule element refers to the complete document, or more specific to the annotation of the type 
+      <span class="quote">&#8220;<span class="quote">DocumentAnnotation</span>&#8221;</span>, which covers the whole document.
+      The action <span class="quote">&#8220;<span class="quote">MARKFAST</span>&#8221;</span> of this rule element creates an annotation of the type <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span> for each found
+      entry of the dictionary <span class="quote">&#8220;<span class="quote">AnimalsList</span>&#8221;</span>.
+    </p>
+    
+    <p>
+      The next example introduces rules with more than one rule element, whereby one of them is a composed rule element. The following rule tries to
+      annotate occurrences of animals separated by commas, e.g., <span class="quote">&#8220;<span class="quote">dog, cat, bird</span>&#8221;</span>. 
+    </p>
+    
+    <pre class="programlisting">DECLARE AnimalEnum;
+(Animal COMMA)+{-&gt; MARK(AnimalEnum,1,2)} Animal;</pre>
+    
+    <p>
+      The rule consists of two rule elements, with <span class="quote">&#8220;<span class="quote">(Animal COMMA)+{-&gt; MARK(AnimalEnum,1,2)}</span>&#8221;</span> being the first rule element and 
+      <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span> the second one. Let us take a closer look at the first rule element. This rule element is actually composed of two normal rule elements, 
+      that are <span class="quote">&#8220;<span class="quote">Animal</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">COMMA</span>&#8221;</span>, and contains a greedy quantifier and one action. This rule element, therefore, matches on 
+      one Animal annotation and a following comma. This is repeated until one of the inner rule elements does not match anymore. Then, there has to be
+      another Animal annotation afterwards, specified by the second rule element of the rule. In this case, the rule matches and its action is executed:
+      The MARK action creates a new annotation of the type <span class="quote">&#8220;<span class="quote">AnimalEnum</span>&#8221;</span>. However, in contrast to the previous examples, this action also
+      contains two numbers. These numbers refer to the rule elements that should be used to calculate the span of the created annotation. The numbers 
+      <span class="quote">&#8220;<span class="quote">1, 2</span>&#8221;</span> state that the new annotation should start with the first rule element, the composed one, and should end with the second rule element.
+    </p>
+
+    <p>
+      Let us make the composed rule element more complex. The following rule also matches on lists of animals, which are
+      separated by semicolon. A disjunctive rule element is therefore added, indicated by the symbol <span class="quote">&#8220;<span class="quote">|</span>&#8221;</span>, which matches on
+      annotations of the type <span class="quote">&#8220;<span class="quote">COMMA</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">SEMICOLON</span>&#8221;</span>.
+    </p>
+    <pre class="programlisting">(Animal (COMMA | SEMICOLON))+{-&gt; MARK(AnimalEnum,1,2)} Animal;</pre>
+
+    <p>
+      There two more special symbols that can be used to link rule elements. If the symbol <span class="quote">&#8220;<span class="quote">|</span>&#8221;</span> is replaced by the
+      symbol <span class="quote">&#8220;<span class="quote">&amp;</span>&#8221;</span> in the last example, then the token after the animal need to be a comma and a semicolon, which is of course not possible.
+      Another symbol with a special meaning is <span class="quote">&#8220;<span class="quote">%</span>&#8221;</span>, which cannot only be used within a composed rule element (parentheses).
+      This symbol can be interpreted as a global <span class="quote">&#8220;<span class="quote">and</span>&#8221;</span>: It links several rules, which only fire, if all rules have successfully matched. 
+      In the following example, an annotation of the type <span class="quote">&#8220;<span class="quote">FoundIt</span>&#8221;</span> is created, if the document contains two periods in a row and two commas in a row:
+    </p>
+    
+    <pre class="programlisting">PERIOD PERIOD % COMMA COMMA{-&gt; FoundIt};</pre>
+
+
+    <p>
+      There is a <span class="quote">&#8220;<span class="quote">wild card</span>&#8221;</span> (<span class="quote">&#8220;<span class="quote">#</span>&#8221;</span>) rule element, which can be used to skip some text or annotations until the next rule element is able to match.
+    </p>
+    
+    <pre class="programlisting">DECLARE Sentence;
+PERIOD #{-&gt; MARK(Sentence)} PERIOD;</pre>
+    
+    <p>
+      This rule annotates everything between two <span class="quote">&#8220;<span class="quote">PERIOD</span>&#8221;</span> annotations with the type <span class="quote">&#8220;<span class="quote">Sentence</span>&#8221;</span>. Please note that the resulting 
+      annotations is automatically trimmed using the current filtering settings. Conditions at wild card rule elements should by avoided and only be used 
+      by advanced users.
+    </p>
+
+	<p>
+      Another special rule element is called <span class="quote">&#8220;<span class="quote">optional</span>&#8221;</span> (<span class="quote">&#8220;<span class="quote">_</span>&#8221;</span>). Sometimes, an annotation should be created on a 
+      text position if it is not followed by an annotation of a specific property. In contrast to normal rule elements with optional quantifier,
+      the optional rule element does not need to match at all. 
+    </p>
+
+	<pre class="programlisting">W ANY{-PARTOF(NUM)};
+W _{-PARTOF(NUM)};</pre>
+	
+	<p>
+      The two rules in this example specify the same pattern: A word that is not followed by a number. The difference between the rules 
+      shows itself at the border of the matching window, e.g., at the end of the document. If the document contains only a single word, 
+      the first rule will not match successfully because the second rule element already fails at its matching condition. The second rule, however,
+      will successfully match due to the optional rule element. 
+    </p>
+
+    <p>
+      Rule elements can contain more then one condition. The rule in the next example tries to identify headlines, which are bold, 
+      underlined and end with a colon.
+    </p>
+
+    <pre class="programlisting">DECLARE Headline;
+Paragraph{CONTAINS(Bold, 90, 100, true), 
+    CONTAINS(Underlined, 90, 100, true), ENDSWITH(COLON) 
+    -&gt; MARK(Headline)};</pre>
+    
+    <p>
+      The matching condition of this rule element is given with the type <span class="quote">&#8220;<span class="quote">Paragraph</span>&#8221;</span>, thus the rule takes a look at all Paragraph annotations.
+      The rule matches only if the three conditions, separated by commas, are fulfilled. The first condition <span class="quote">&#8220;<span class="quote">CONTAINS(Bold, 90, 100, true)</span>&#8221;</span> states that
+      90%-100% of the matched paragraph annotation should also be annotated with annotations of the type <span class="quote">&#8220;<span class="quote">Bold</span>&#8221;</span>. The boolean parameter <span class="quote">&#8220;<span class="quote">true</span>&#8221;</span>
+      indicates that amount of Bold annotations should be calculated relatively to the matched annotation. The two numbers <span class="quote">&#8220;<span class="quote">90,100</span>&#8221;</span> are, therefore, interpreted as
+      percent amounts. The exact calculation of the coverage is dependent on the tokenization of the document and is neglected for now. The second condition 
+      <span class="quote">&#8220;<span class="quote">CONTAINS(Underlined, 90, 100, true)</span>&#8221;</span> consequently states that the paragraph should also contain at least 90% of annotations of the type <span class="quote">&#8220;<span class="quote">underlined</span>&#8221;</span>.
+      The third condition <span class="quote">&#8220;<span class="quote">ENDSWITH(COLON)</span>&#8221;</span> finally forces the Paragraph annotation to end with a colon. It is only fulfilled, if there is an annotation of the type
+      <span class="quote">&#8220;<span class="quote">COLON</span>&#8221;</span>, which has an end offset equal to the end offset of the matched Paragraph annotation.
+    </p>
+    
+    <p>
+      The readability and maintenance of rules does not increase, if more conditions are added.
+      One of the strengths of the UIMA Ruta language is that it provides different approaches to solve an annotation task. The next two examples 
+      introduce actions for transformation-based rules.  
+    </p>
+    
+    <pre class="programlisting">Headline{-CONTAINS(W) -&gt; UNMARK(Headline)};</pre>
+    
+    <p>
+      This rule consists of one condition and one action. The condition <span class="quote">&#8220;<span class="quote">-CONTAINS(W)</span>&#8221;</span> is negated (indicated by the character <span class="quote">&#8220;<span class="quote">-</span>&#8221;</span>), 
+      and is therefore only fulfilled, if there are no annotations of the type <span class="quote">&#8220;<span class="quote">W</span>&#8221;</span> within the bound of the matched Headline annotation.
+      The action <span class="quote">&#8220;<span class="quote">UNMARK(Headline)</span>&#8221;</span> removes the matched Headline annotation. Put into simple words, headlines that contain no words at all are not headlines.
+    </p>
+    
+    <p>
+      The next rule does not remove an annotation, but changes its offsets dependent on the context.
+    </p>
+    
+    <pre class="programlisting">Headline{-&gt; SHIFT(Headline, 1, 2)} COLON;</pre>
+    
+    <p>
+      Here, the action <span class="quote">&#8220;<span class="quote">SHIFT(Headline, 1, 2)</span>&#8221;</span> expands the matched Headline annotation to the next colon, if that Headline annotation
+      is followed by a COLON annotation.
+    </p>
+    
+    <p>
+      UIMA Ruta rules can contain arbitrary conditions and actions, which is illustrated by the next example.
+    </p>
+    
+    <pre class="programlisting">DECLARE Month, Year, Date;
+ANY{INLIST(MonthsList) -&gt; MARK(Month), MARK(Date,1,3)}
+    PERIOD? NUM{REGEXP(".{2,4}") -&gt; MARK(Year)};</pre>
+
+    <p>
+      This rule consists of three rule elements. The first one matches on every token, which has a covered text that occurs in a word lists named <span class="quote">&#8220;<span class="quote">MonthsList</span>&#8221;</span>.
+      The second rule element is optional and does not need to be fulfilled, which is indicated by the quantifier <span class="quote">&#8220;<span class="quote">?</span>&#8221;</span>. The last rule element matches
+      on numbers that fulfill the regular expression <span class="quote">&#8220;<span class="quote">REGEXP(".{2,4}"</span>&#8221;</span> 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 <span class="quote">&#8220;<span class="quote">Month</span>&#8221;</span> is created for the first rule element,
+      an annotation of the type <span class="quote">&#8220;<span class="quote">Year</span>&#8221;</span> is created for the last rule element and an annotation of the type <span class="quote">&#8220;<span class="quote">Date</span>&#8221;</span> 
+      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 
+      <span class="quote">&#8220;<span class="quote">Dec. 2004</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">July 85</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">11.2008</span>&#8221;</span> and creates the corresponding annotations.
+    </p>
+
+    <p>
+      After introducing the composition of rule elements, the default matching strategy is examined. The two rules in the next example create an annotation
+      for a sequence of arbitrary tokens with the only difference of one condition.
+    </p>
+
+    <pre class="programlisting">DECLARE Text1, Text2;
+ANY+{ -&gt; MARK(Text1)};
+ANY+{-PARTOF(Text2) -&gt; MARK(Text2)};</pre>
+
+    <p>
+      The first rule matches on each occurrence of an arbitrary token and continues this until the end of the document is reached. 
+      This is caused by the greedy quantifier <span class="quote">&#8220;<span class="quote">+</span>&#8221;</span>. Note that this rule considers each occurrence of a token and is therefore
+      executed for each token resulting many overlapping annotations. This behavior is illustrated with an example:
+      When applied on the document <span class="quote">&#8220;<span class="quote">Peter works for Frank</span>&#8221;</span>, the rule creates four annotations with the covered texts 
+      <span class="quote">&#8220;<span class="quote">Peter works for Frank</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">works for Frank</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">for Frank</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">Frank</span>&#8221;</span>.
+      The rule first tries to match on the token <span class="quote">&#8220;<span class="quote">Peter</span>&#8221;</span> and continues its matching. Then, it tries to match on the token <span class="quote">&#8220;<span class="quote">works</span>&#8221;</span> and
+      continues its matching, and so on.
+    </p>
+    <p>
+      In this example, the second rule only returns one annotation, which covers the complete document. This is caused by the additional
+      condition <span class="quote">&#8220;<span class="quote">-PARTOF(Text2)</span>&#8221;</span>. The PARTOF condition is fulfilled, if the matched annotation is located within an annotation of the given type, or
+      put in simple words, if the matched annotation is part of an annotation of the type <span class="quote">&#8220;<span class="quote">Text2</span>&#8221;</span>. When applied on the 
+      document <span class="quote">&#8220;<span class="quote">Peter works for Frank</span>&#8221;</span>, the rule matches on the first token <span class="quote">&#8220;<span class="quote">Peter</span>&#8221;</span>, continues its match and 
+      creates an annotation of the type <span class="quote">&#8220;<span class="quote">Text2</span>&#8221;</span> for the complete document. Then it tries to match on the second token <span class="quote">&#8220;<span class="quote">works</span>&#8221;</span>, but fails, 
+      because this token is already part of an Text2 annotation.
+    </p>
+    
+    <p>
+      UIMA Ruta rules can not only be used to create or modify annotations, but also to create features for annotations. The next example defines 
+      and assigns a relation of employment, by storing the given annotations as feature values.
+    </p>
+    
+    <pre class="programlisting">DECLARE Annotation EmplRelation 
+    (Employee employeeRef, Employer employerRef);
+Sentence{CONTAINS(EmploymentIndicator) -&gt; CREATE(EmplRelation,
+    "employeeRef" = Employee, "employerRef" = Employer)};</pre>
+
+    <p>
+      The first statement of this example is a declaration that defines a new type of annotation named <span class="quote">&#8220;<span class="quote">EmplRelation</span>&#8221;</span>. 
+      This annotation has two features: 
+      One feature with the name <span class="quote">&#8220;<span class="quote">employeeRef</span>&#8221;</span> of the type <span class="quote">&#8220;<span class="quote">Employee</span>&#8221;</span> and 
+      one feature with the name <span class="quote">&#8220;<span class="quote">employerRef</span>&#8221;</span> of the type <span class="quote">&#8220;<span class="quote">Employer</span>&#8221;</span>.
+      If the parent type is Annotation, then it can be omitted resulting in the following declaration:
+      </p><pre class="programlisting">DECLARE EmplRelation (Employee employeeRef, Employer employerRef);</pre><p>
+      The second statement of the example, which is a simple rule, creates one annotation of the type <span class="quote">&#8220;<span class="quote">EmplRelation</span>&#8221;</span> for
+      each Sentence annotation that contains at least one annotation of the type <span class="quote">&#8220;<span class="quote">EmploymentIndicator</span>&#8221;</span>. Additionally to creating an annotation,
+      the CREATE action also assigns an annotation of the <span class="quote">&#8220;<span class="quote">Employee</span>&#8221;</span>, which needs to be located within the span of the matched sentence, 
+      to the feature <span class="quote">&#8220;<span class="quote">employeeRef</span>&#8221;</span> and an Employer annotation to the feature <span class="quote">&#8220;<span class="quote">employerRef</span>&#8221;</span>. The annotations mentioned in this 
+      example need to be present in advance.
+    </p>
+
+    <p>
+      In order to refer to annotations and, for example, assigning them to some features, 
+      special kinds of local and global variables can be utilized. Local variables for annotations 
+      do not need to be defined by are specified by a label at a rule element. This label can be utilized
+      for referring to the matched annotation of this rule element within the current rule match alone.
+      The following example illustrate some simple use cases using local variables:
+    </p>
+
+    <pre class="programlisting">DECLARE Annotation EmplRelation 
+   (Employee employeeRef, Employer employerRef);
+e1:Employer # EmploymentIndicator # e2:Employee)
+    {-&gt; EmplRelation, EmplRelation.employeeRef=e2, 
+        EmplRelation.employerRef=e1};</pre>
+    
+    <p>
+      Global variables for annotations are declared like other variables and are able to store annotations
+      across rules as illustrated by the next example:
+    </p>
+    
+     <pre class="programlisting">DECLARE MentionedAfter(Annotation first);
+ANNOTATION firstPerson;
+# p:Person{-&gt; firstPerson = p};
+Entity{-&gt; MentionedAfter, MentionedAfter.first = firstPerson};</pre>
+
+    <p>
+      The first line declares a new type that are utilized afterwards. The second line defines a variable 
+      named <code class="code">firstPerson</code> which can store one annotation. A variable able to hold several annotations 
+      is defined with ANNOTATIONLIST. The next line assigns the first occurrence of Person annotation to the
+      annotation variable <code class="code">firstPerson</code>. The last line creates an annotation of the type MentionedAfter and assigns the value 
+      of the variable <code class="code">firstPerson</code> to the feature <code class="code">first</code> of the created annotation.
+    </p>
+
+    <p>
+      Expressions for annotations can be extended by a feature match and also conditions. This does also apply for type expressions
+      that represent annotations. This functionality is illustrated with a simple example:
+    </p>
+    <pre class="programlisting">Sentence{-&gt; CREATE(EmplRelation, "employeeRef" = 
+    Employee.ct=="Peter"{ENDSWITH(Sentence)})};</pre>
+    
+    <p>
+      Here, an annotation of the type <code class="code">EmplRelation</code> is created for each sentence.
+      The feature <code class="code">employeeRef</code> is filled with one <code class="code">Employee</code> annotation.
+      This annotation is specified by its type <code class="code">Employee</code>. The first annotation
+      of this type within the matched sentence, which covers the text <span class="quote">&#8220;<span class="quote">Peter</span>&#8221;</span> and also
+      ends with a <code class="code">Sentence</code> annotation, is selected.
+    </p>
+    
+    <p>
+      Sometimes, an annotation which was just created by an action should be assigned to a feature. 
+      This can be achieved by referring to the annotation given its type like it was shown in the 
+      first example with <span class="quote">&#8220;<span class="quote">EmplRelation</span>&#8221;</span>. However, this can cause problems in situations, e.g. where
+      several annotation of a type are present at a specific span. Local variables using labels can also be used directly at actions, 
+      which create or modify actions. The action will assign the new annotation the the label variable, 
+      which can then be utilized by following actions as shown in the following example:
+    </p>
+    <pre class="programlisting">W.ct=="Peter"{-&gt; e:Employee, CREATE(EmplRelation, "employeeRef" = e)};</pre>
+    
+    <p>
+      In the last examples, the values of features were defined as annotation types. However, also primitive 
+      types can be used, as will be shown in the next example, together with a short introduction of variables.
+    </p>
+
+    <pre class="programlisting">DECLARE Annotation MoneyAmount(STRING currency, INT amount);
+INT moneyAmount;
+STRING moneyCurrency;
+NUM{PARSE(moneyAmount)} SPECIAL{REGEXP("&#8364;") -&gt; MATCHEDTEXT(moneyCurrency),
+    CREATE(MoneyAmount, 1, 2, "amount" = moneyAmount,
+        "currency" = moneyCurrency)};</pre>
+    
+    <p>
+      First, a new annotation with the name <span class="quote">&#8220;<span class="quote">MoneyAmount</span>&#8221;</span> and two features are defined, one string feature and one integer feature.
+      Then, two UIMA Ruta variables are declared, one integer variable and one string variable. The rule matches on a number, whose value is stored 
+      in the variable <span class="quote">&#8220;<span class="quote">moneyAmount</span>&#8221;</span>, followed by a special token that needs to be equal to the string <span class="quote">&#8220;<span class="quote">&#8364;</span>&#8221;</span>. Then,
+      the covered text of the special annotation is stored in the string variable <span class="quote">&#8220;<span class="quote">moneyCurrency</span>&#8221;</span> and annotation of the
+      type <span class="quote">&#8220;<span class="quote">MoneyAmount</span>&#8221;</span> spanning over both rule elements is created. Additionally, the variables are assigned as feature values.
+    </p>
+
+    <p>
+      Using feature expression for conditions and action, can reduce the complexity of a rule. The first rule in the following example set the value of the feature
+      <span class="quote">&#8220;<span class="quote">currency</span>&#8221;</span> of the annotation of the type <span class="quote">&#8220;<span class="quote">MoneyAmount</span>&#8221;</span> to <span class="quote">&#8220;<span class="quote">Euro</span>&#8221;</span>, if it was <span class="quote">&#8220;<span class="quote">&#8364;</span>&#8221;</span> before.
+      The second rule creates an annotation of the type <span class="quote">&#8220;<span class="quote">LessThan</span>&#8221;</span> for all annotations of the type <span class="quote">&#8220;<span class="quote">MoneyAmount</span>&#8221;</span>, 
+      if their amount is less than 100 and the currency is <span class="quote">&#8220;<span class="quote">Euro</span>&#8221;</span>. 
+    </p>
+    
+    <pre class="programlisting">DECLARE LessThan;
+MoneyAmount.currency=="&#8364;"{-&gt; MoneyAmount.currency="Euro"};
+MoneyAmount{(MoneyAmount.amount&lt;=100), 
+    MoneyAmount.currency=="Euro" -&gt; LessThan};</pre>
+
+    <p>
+      UIMA Ruta script files with many rules can quickly confuse the reader. The UIMA Ruta language, therefore, allows to import other script files in order to increase
+      the modularity of a project or to create rule libraries. The next example imports the rules together with all known types of another script file 
+      and executes that script file.
+    </p>
+
+    <pre class="programlisting">SCRIPT uima.ruta.example.SecondaryScript;
+Document{-&gt; CALL(SecondaryScript)};</pre>
+
+    <p>
+      The script file with the name <span class="quote">&#8220;<span class="quote">SecondaryScript.ruta</span>&#8221;</span>, which is located in the package <span class="quote">&#8220;<span class="quote">uima/ruta/example</span>&#8221;</span>, is imported and executed
+      by the CALL action on the complete document. The script needs to be located in the folder specified by the parameter 
+      <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.scriptPaths" title="scriptPaths">scriptPaths</a>, or in a corresponding package in the classpath. It is also possible to import script files of other UIMA Ruta projects, e.g.,
+      by adapting the configuration parameters of the UIMA Ruta Analysis Engine or 
+      by setting a project reference in the project properties of a UIMA Ruta project.
+    </p>
+
+    <p>
+      For simple rules that match on the complete document and only specify actions, a simplified syntax exists that omits the matching parts:
+    </p>
+    
+    <pre class="programlisting">SCRIPT uima.ruta.example.SecondaryScript;
+CALL(SecondaryScript);</pre>
+
+    <p>
+      The types of important annotations of the application are often defined in a separate type system. The next example shows how to import those types.
+    </p>
+
+    <pre class="programlisting">TYPESYSTEM my.package.NamedEntityTypeSystem;
+Person{PARTOF(Organization) -&gt; UNMARK(Person)};
+</pre>
+
+    <p>
+      The type system descriptor file with the name <span class="quote">&#8220;<span class="quote">NamedEntityTypeSystem.xml</span>&#8221;</span> located in the package <span class="quote">&#8220;<span class="quote">my/package</span>&#8221;</span> is imported.
+      The descriptor needs to be located in a folder specified by the parameter 
+      <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.descriptorPaths" title="descriptorPaths">descriptorPaths</a>.
+    </p>
+
+
+    <p>
+      It is sometimes easier to express functionality with control structures known by programming languages rather than to engineer all functionality 
+      only with matching rules. The UIMA Ruta language provides the BLOCK element for some of these use cases. 
+      The UIMA Ruta BLOCK element starts with the keyword <span class="quote">&#8220;<span class="quote">BLOCK</span>&#8221;</span> followed by its name in parentheses. The name of a block has two purposes:
+      On the one hand, it is easier to distinguish the block, if they have different names, e.g., in the 
+      <a class="link" href="#section.ugr.tools.ruta.workbench.explain_perspective" title="3.5.&nbsp;UIMA Ruta Explain Perspective">explain perspective</a> of the UIMA Ruta Workbench. On the other hand,
+      the name can be used to execute this block using the CALL action. Hereby, it is possible to access only specific sets of rules of other script files, 
+      or to implement a recursive call of rules. After the name of the block, a single rule element is given, which has curly parentheses, 
+      even if no conditions or actions are specified. Then, the body of the block is framed by curly brackets.
+    </p>
+
+    <pre class="programlisting">BLOCK(English) Document{FEATURE("language", "en")} {
+    // rules for english documents
+}
+BLOCK(German) Document{FEATURE("language", "de")} {
+    // rules for german documents
+}</pre>
+
+    <p>
+      This example contains two simple BLOCK statements. The rules defined within the block are only executed, if the condition in the head of the block is fulfilled.
+      The rules of the first block are only considered if the feature <span class="quote">&#8220;<span class="quote">language</span>&#8221;</span> of the document annotation has the value <span class="quote">&#8220;<span class="quote">en</span>&#8221;</span>.
+      Following this, the rules of the second block are only considered for German documents.
+    </p>
+
+    <p>
+      The rule element of the block definition can also refer to other annotation types than <span class="quote">&#8220;<span class="quote">Document</span>&#8221;</span>. While the last example implemented something similar 
+      to an if-statement, the next example provides a show case for something similar to a for-each-statement.
+    </p>
+
+    <pre class="programlisting">DECLARE SentenceWithNoLeadingNP;
+BLOCK(ForEach) Sentence{} {
+    Document{-STARTSWITH(NP) -&gt; MARK(SentenceWithNoLeadingNP)};
+}
+</pre>
+    
+    <p>
+      Here, the rule in the block statement is performed for each occurrence of an annotation of the type <span class="quote">&#8220;<span class="quote">Sentence</span>&#8221;</span>. 
+      The rule within the block matches on the complete document, which is the current sentence in the context of the block statement. 
+      As a consequence, this example creates an annotation of the type <span class="quote">&#8220;<span class="quote">SentenceWithNoLeadingNP</span>&#8221;</span> for each sentence 
+      that does not start with a NP annotation.
+    </p>
+
+    <p>
+      There are two more language constructs (<span class="quote">&#8220;<span class="quote">-&gt;</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">&lt;-</span>&#8221;</span>) that allow to apply rules within a certain context. These rules are added to an arbitrary rule element 
+      and are called inlined rules. The first example interprets the inlined rules as actions. They are executed if the surrounding rule was able to match, 
+      which makes this one very similar to the block statement.
+    </p>
+
+    <pre class="programlisting">DECLARE SentenceWithNoLeadingNP;
+Sentence{}-&gt;{
+    Document{-STARTSWITH(NP) -&gt; SentenceWithNoLeadingNP};
+};
+</pre>
+
+    <p>
+      The second one (<span class="quote">&#8220;<span class="quote">&lt;-</span>&#8221;</span>) interprets the inlined rules as conditions. The surrounding rule can only match if at least one inlined rule was successfully applied.
+      In the following example, a sentence is annotated with the type SentenceWithNPNP, if there are two successive NP annotations within this sentence.
+    </p>
+    <pre class="programlisting">DECLARE SentenceWithNPNP;
+Sentence{-&gt; SentenceWithNPNP}&lt;-{
+    NP NP;
+};</pre>
+
+	<p>
+      A rule element may be extended with several inlined rule block as condition or action. If there a more than one inlined rule blocks as condition, 
+      each needs to contain at least one rule that was successfully applied. In the following example, the rule will one match if the sentence contains 
+      a number followed by a another number and a period followed by a comma, independently from their location within the sentence:
+    </p>
+	
+	<pre class="programlisting">Sentence&lt;-{NUM NUM;}&lt;-{PERIOD COMMA;};</pre>
+		
+    <p>
+      Let us take a closer look on what exactly the UIMA Ruta rules match. The following rule matches on a word followed by another word:
+    </p>
+    <pre class="programlisting">W W;</pre>
+    
+    <p>
+      To be more precise, this rule matches on all documents like <span class="quote">&#8220;<span class="quote">Apache UIMA</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">Apache     UIMA</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">ApacheUIMA</span>&#8221;</span>,
+      <span class="quote">&#8220;<span class="quote">Apache &lt;b&gt;UIMA&lt;/b&gt;</span>&#8221;</span>. There are two main reasons for this: First of all, it depends on how the available annotations are defined. The default seeder
+      for the initial annotations creates an annotation for all characters until an upper case character occurs. Thus, the string <span class="quote">&#8220;<span class="quote">ApacheUIMA</span>&#8221;</span> consists of 
+      two tokens.
+      However, more important, the UIMA Ruta language provides a concept of visibility of the annotations. By default, all annotations of the types 
+      <span class="quote">&#8220;<span class="quote">SPACE</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">NBSP</span>&#8221;</span>, <span class="quote">&#8220;<span class="quote">BREAK</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">MARKUP</span>&#8221;</span> (whitespace and XML elements) are filtered and not visible. This holds of course for
+      their covered text, too. The rule elements skip all positions of the
+      document where those annotations occur. The rule in the last example matches on all examples. Without the default filtering settings, 
+      with all annotations set to visible, the rule matches only on the document <span class="quote">&#8220;<span class="quote">ApacheUIMA</span>&#8221;</span> since it is the only one that contains two word annotations without
+      any whitespace between them. 
+    </p>
+    
+    <p>
+      The filtering setting can also be modified by the UIMA Ruta rules themselves. The next example provides rules that extend and limit 
+      the amount of visible text of the document.
+    </p>
+    
+    <pre class="programlisting">Sentence;
+Document{-&gt; RETAINTYPE(SPACE)};
+Sentence;
+Document{-&gt; FILTERTYPE(CW)};
+Sentence;
+Document{-&gt; RETAINTYPE, FILTERTYPE};</pre>
+
+    <p>
+      The first rule matches on sentences, which do not start with any filtered type. Sentences that start with whitespace or markup, 
+      for example, are not considered. 
+      The next rule retains all text that is covered by annotations of the type <span class="quote">&#8220;<span class="quote">SPACE</span>&#8221;</span> meaning 
+      that the rule elements are now sensible to whitespaces. The following rule will, therefore, match on sentences that start with whitespaces.
+      The third rule now filters the type <span class="quote">&#8220;<span class="quote">CW</span>&#8221;</span> with the consequence that all capitalized words are invisible.
+      If the following rule now wants to match on sentences, then this is only possible for Sentence annotations that do not start with a capitalized word.
+      The last rule finally resets the filtering setting to the default configuration in the UIMA Ruta Analysis Engine.
+    </p>
+    
+    <p>
+      The next example gives a showcase for importing external Analysis Engines and for modifying the documents by creating a new view called <span class="quote">&#8220;<span class="quote">modified</span>&#8221;</span>.
+      Additional Analysis Engines can be imported with the keyword <span class="quote">&#8220;<span class="quote">ENGINE</span>&#8221;</span> followed by the name of the descriptor. These imported Analysis Engines can be 
+      executed with the actions <span class="quote">&#8220;<span class="quote">CALL</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">EXEC</span>&#8221;</span>. If the executed Analysis Engine adds, removes or modifies annotations, then their types need 
+      to be mentioned when calling the descriptor, or else these annotations will not be correctly processed by the following UIMA Ruta rules.
+    </p>
+
+    <pre class="programlisting">ENGINE utils.Modifier;
+Date{-&gt; DEL};
+MoneyAmount{-&gt; REPLACE("&lt;MoneyAmount/&gt;")};
+Document{-&gt; COLOR(Headline, "green")};
+Document{-&gt; EXEC(Modifier)};
+</pre>
+
+  <p>
+    In this example, we first import an Analysis Engine defined by the descriptor <span class="quote">&#8220;<span class="quote">Modifier.xml</span>&#8221;</span> located in the folder <span class="quote">&#8220;<span class="quote">utils</span>&#8221;</span>. 
+    The descriptor needs to be located in the folder specified by the parameter <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.descriptorPaths" title="descriptorPaths">descriptorPaths</a>.
+    The first rule deletes all text covered by annotations of the type <span class="quote">&#8220;<span class="quote">Date</span>&#8221;</span>. The second rule replaces the text of all annotations of the type <span class="quote">&#8220;<span class="quote">MoneyAmount</span>&#8221;</span> 
+    with the string <span class="quote">&#8220;<span class="quote">&lt;MoneyAmount/&gt;</span>&#8221;</span>. The third rule remembers to set the background color of text in Headline annotation to green. The last rule
+    finally performs all of these changes in an additional view called <span class="quote">&#8220;<span class="quote">modified</span>&#8221;</span>, which is specified in the configuration parameters of the analysis engine.
+    <a class="xref" href="#ugr.tools.ruta.ae.modifier" title="1.5.4.&nbsp;Modifier">Section&nbsp;1.5.4, &#8220;Modifier&#8221;</a> and <a class="xref" href="#ugr.tools.ruta.language.modification" title="2.17.&nbsp;Modification">Section&nbsp;2.17, &#8220;Modification&#8221;</a> provide a more detailed description.
+  </p>
+  
+  <p>
+    In the last example, a descriptor file was loaded in order to import and apply an external analysis engine. Analysis engines can also be loaded using uimaFIT, 
+    whereas the given class name has to be present in the classpath. In the UIMA Ruta Workbench, you can add a dependency to a java project, which contains the 
+    implementation, to the UIMA Ruta project. 
+    The following example loads an analysis engine without an descriptor and applies it on the document. The additional list of types states that
+    the annotations of those types created by the analysis engine should be available to the following Ruta rules.
+    
+  </p>
+      <pre class="programlisting">UIMAFIT my.package.impl.MyAnalysisEngine;
+Document{-&gt; EXEC(MyAnalysisEngine, {MyType1, MyType2})};
+</pre>
+  
+  </div>
+  
+  <div class="section" title="1.5.&nbsp;UIMA Analysis Engines"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ugr.tools.ruta.ae">1.5.&nbsp;UIMA Analysis Engines</h2></div></div></div>
+    
+    <p>This section gives an overview of the UIMA Analysis Engines shipped with UIMA Ruta. The most 
+      important one is <span class="quote">&#8220;<span class="quote">RutaEngine</span>&#8221;</span>, a generic analysis engine, which is able to interpret 
+      and execute script files. The other analysis engines provide support for some additional functionality or
+      add certain types of annotations.
+    </p>
+    <div class="section" title="1.5.1.&nbsp;Ruta Engine"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.ae.basic">1.5.1.&nbsp;Ruta Engine</h3></div></div></div>
+      
+      <p>
+         This generic Analysis Engine is the most important one for the UIMA Ruta language since it is
+         responsible for applying the UIMA Ruta rules on a CAS. Its functionality is configured by the configuration parameters, 
+         which, for example, specify the rule file that should be executed. In the UIMA Ruta Workbench, a basic template named <span class="quote">&#8220;<span class="quote">BasicEngine.xml</span>&#8221;</span>
+         is given in the descriptor folder of a UIMA Ruta project and correctly configured descriptors typically named <span class="quote">&#8220;<span class="quote">MyScriptEngine.xml</span>&#8221;</span>
+         are generated in the descriptor folder corresponding to the package namespace of the script file.
+         The available configuration parameters of the UIMA Ruta Analysis Engine are described in the following.   
+      </p>
+      
+      <div class="section" title="1.5.1.1.&nbsp;Configuration Parameters"><div class="titlepage"><div><div><h4 class="title" id="ugr.tools.ruta.ae.basic.parameter">1.5.1.1.&nbsp;Configuration Parameters</h4></div></div></div>
+        
+        <p>
+          The configuration parameters of the UIMA Ruta Analysis Engine can be subdivided into three
+          different groups: parameters for the setup of the environment (<a class="link" href="#ugr.tools.ruta.ae.basic.parameter.mainScript" title="mainScript">mainScript</a>
+          to <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.additionalExtensions" title="additionalExtensions">additionalExtensions</a>), 
+          parameters that change the behavior of the analysis engine (<a class="link" href="#ugr.tools.ruta.ae.basic.parameter.reloadScript" title="reloadScript">reloadScript</a>
+          to <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.simpleGreedyForComposed" title="simpleGreedyForComposed">simpleGreedyForComposed</a>) 
+          and parameters for creating additional information how the rules were executed 
+          (<a class="link" href="#ugr.tools.ruta.ae.basic.parameter.debug" title="debug">debug</a>
+          to <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.createdBy" title="createdBy">createdBy</a>). First, a short overview of the configuration parameters is given in
+          <a class="xref" href="#table.ugr.tools.ruta.ae.parameter" title="Table&nbsp;1.1.&nbsp;Configuration parameters of the UIMA Ruta Analysis Engine">Table&nbsp;1.1, &#8220;Configuration parameters of the UIMA Ruta Analysis Engine   &#8221;</a>. Afterwards, all parameters are described in detail with examples.
+        </p>
+        <p>
+          To change the value of any configuration parameter within a UIMA Ruta script, the CONFIGURE action (see <a class="xref" href="#ugr.tools.ruta.language.actions.configure" title="2.8.8.&nbsp;CONFIGURE">Section&nbsp;2.8.8, &#8220;CONFIGURE&#8221;</a>)
+          can be used. For changing behavior of <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.dynamicAnchoring" title="dynamicAnchoring">dynamicAnchoring</a> the DYNAMICANCHORING action 
+          (see <a class="xref" href="#ugr.tools.ruta.language.actions.dynamicanchoring" title="2.8.11.&nbsp;DYNAMICANCHORING">Section&nbsp;2.8.11, &#8220;DYNAMICANCHORING&#8221;</a>) is recommended.
+        </p>
+        <p>
+          </p><div class="table"><a name="table.ugr.tools.ruta.ae.parameter"></a><p class="title"><b>Table&nbsp;1.1.&nbsp;Configuration parameters of the UIMA Ruta Analysis Engine   </b></p><div class="table-contents">
+            
+            <table summary="Configuration parameters of the UIMA Ruta Analysis Engine   " style="border-collapse: collapse;border-top: 0.5pt solid black; border-bottom: 0.5pt solid black; border-left: 0.5pt solid black; border-right: 0.5pt solid black; "><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><thead><tr><th style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; " align="center">Name</th><th style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; " align="center">Short description</th><th style="border-bottom: 0.5pt solid black; " align="center">Type</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.mainScript" title="mainScript">mainScript</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">Name with complete namespace of the script which will be interpreted and
+                    executed by the analysis engine.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Single String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.rules" title="rules">rules</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">Script (list of rules) to be applied.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Single String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.rules" title="rules">rulesScriptName</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">This parameter specifies the name of the non-existing script if the parameter 'rules' is used.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Single String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.scriptEncoding" title="scriptEncoding">scriptEncoding</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">Encoding of all UIMA Ruta script files.</td><td style="border-bottom: 0.5pt solid black; ">Single String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.scriptPaths" title="scriptPaths">scriptPaths</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">List of absolute locations, which contain the necessary script files like
+                    the main script.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Multi String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.descriptorPaths" title="descriptorPaths">descriptorPaths</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">List of absolute locations, which contain the necessary descriptor files
+                    like type systems.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Multi String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.resourcePaths" title="resourcePaths">resourcePaths</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">List of absolute locations, which contain the necessary resource files like
+                    word lists.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Multi String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.additionalScripts" title="additionalScripts">additionalScripts</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">Optional list of names with complete namespace of additional scripts, which can be
+                    referred to.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Multi String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">
+                    <a class="link" href="#ugr.tools.ruta.ae.basic.parameter.additionalEngines" title="additionalEngines">additionalEngines</a>
+                  </td><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">Optional list of names with complete namespace of additional analysis engines, which
+                    can be called by UIMA Ruta rules.
+                  </td><td style="border-bottom: 0.5pt solid black; ">Multi String</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; ">

[... 7403 lines stripped ...]