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 2013/05/01 17:21:53 UTC
svn commit: r1478049 [2/2] - in /uima/sandbox/ruta/trunk:
ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/
ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/
ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/ ruta...
Modified: uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html Wed May 1 15:21:51 2013
@@ -1,11 +1,11 @@
-<div class="section" title="2.7.1. ADD"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.add">2.7.1. ADD</h3></div></div></div>
+<div class="section" title="2.7.1. ADD"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.add">2.7.1. ADD</h3></div></div></div>
<p>
The ADD action adds all the elements of the passed
RutaExpressions to a given list. For example, this expressions
could be a string, an integer variable or a list. For a
complete overview on Ruta expressions see
- <a class="xref" href="#ugr.tools.tm.language.expressions" title="2.5. Expressions">Section 2.5, “Expressions”</a>.
+ <a class="xref" href="#ugr.tools.ruta.language.expressions" title="2.5. Expressions">Section 2.5, “Expressions”</a>.
</p>
<div class="section" title="2.7.1.1. Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1345">2.7.1.1.
<span class="bold"><strong>Definition:</strong></span>
@@ -29,7 +29,7 @@
</div>
</div>
- <div class="section" title="2.7.2. ADDFILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.addfiltertype">2.7.2. ADDFILTERTYPE</h3></div></div></div>
+ <div class="section" title="2.7.2. ADDFILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.addfiltertype">2.7.2. ADDFILTERTYPE</h3></div></div></div>
<p>
The ADDFILTERTYPE action adds its arguments to the list of filtered types,
@@ -56,7 +56,7 @@
</div>
</div>
- <div class="section" title="2.7.3. ADDRETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.addretaintype">2.7.3. ADDRETAINTYPE</h3></div></div></div>
+ <div class="section" title="2.7.3. ADDRETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.addretaintype">2.7.3. ADDRETAINTYPE</h3></div></div></div>
<p>
The ADDFILTERTYPE action adds its arguments to the list of retained types,
@@ -84,7 +84,7 @@
</div>
- <div class="section" title="2.7.4. ASSIGN"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.assign">2.7.4. ASSIGN</h3></div></div></div>
+ <div class="section" title="2.7.4. ASSIGN"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.assign">2.7.4. ASSIGN</h3></div></div></div>
<p>
The ASSIGN action assigns the value of the passed expression to
@@ -120,7 +120,7 @@
</div>
</div>
- <div class="section" title="2.7.5. CALL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.call">2.7.5. CALL</h3></div></div></div>
+ <div class="section" title="2.7.5. CALL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.call">2.7.5. CALL</h3></div></div></div>
<p>
The CALL action initiates the execution of a different script
@@ -152,7 +152,7 @@
</div>
</div>
- <div class="section" title="2.7.6. CLEAR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.clear">2.7.6. CLEAR</h3></div></div></div>
+ <div class="section" title="2.7.6. CLEAR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.clear">2.7.6. CLEAR</h3></div></div></div>
<p>
The CLEAR action removes all elements of the given list. If the list was initialized as it was declared,
@@ -179,7 +179,7 @@
</div>
</div>
- <div class="section" title="2.7.7. COLOR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.color">2.7.7. COLOR</h3></div></div></div>
+ <div class="section" title="2.7.7. COLOR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.color">2.7.7. COLOR</h3></div></div></div>
<p>
The COLOR action sets the color of an annotation type in the
@@ -215,7 +215,7 @@
</div>
</div>
- <div class="section" title="2.7.8. CONFIGURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.configure">2.7.8. CONFIGURE</h3></div></div></div>
+ <div class="section" title="2.7.8. CONFIGURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.configure">2.7.8. CONFIGURE</h3></div></div></div>
<p>
The CONFIGURE action can be used to configure the analysis
@@ -247,7 +247,7 @@ Document{->CONFIGURE(HtmlAnnotator, "
</div>
</div>
- <div class="section" title="2.7.9. CREATE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.create">2.7.9. CREATE</h3></div></div></div>
+ <div class="section" title="2.7.9. CREATE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.create">2.7.9. CREATE</h3></div></div></div>
<p>
The CREATE action is similar to the MARK action. It also
@@ -281,7 +281,7 @@ Document{->CONFIGURE(HtmlAnnotator, "
</div>
</div>
- <div class="section" title="2.7.10. DEL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.del">2.7.10. DEL</h3></div></div></div>
+ <div class="section" title="2.7.10. DEL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.del">2.7.10. DEL</h3></div></div></div>
<p>
The DEL action deletes the matched text fragments in the
@@ -310,7 +310,7 @@ Document{->CONFIGURE(HtmlAnnotator, "
</div>
</div>
- <div class="section" title="2.7.11. DYNAMICANCHORING"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.dynamicanchoring">2.7.11. DYNAMICANCHORING</h3></div></div></div>
+ <div class="section" title="2.7.11. DYNAMICANCHORING"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.dynamicanchoring">2.7.11. DYNAMICANCHORING</h3></div></div></div>
<p>
The DYNAMICANCHORING action turns dynamic anchoring on or off
@@ -339,7 +339,7 @@ Document{->CONFIGURE(HtmlAnnotator, "
</div>
</div>
- <div class="section" title="2.7.12. EXEC"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.exec">2.7.12. EXEC</h3></div></div></div>
+ <div class="section" title="2.7.12. EXEC"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.exec">2.7.12. EXEC</h3></div></div></div>
<p>
The EXEC action initiates the execution of a different script
@@ -371,7 +371,7 @@ Document{->EXEC(NamedEntities)};</pre
</p>
</div>
</div>
- <div class="section" title="2.7.13. FILL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.fill">2.7.13. FILL</h3></div></div></div>
+ <div class="section" title="2.7.13. FILL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.fill">2.7.13. FILL</h3></div></div></div>
<p>
The FILL action fills a choosen subset of the given type's
@@ -402,12 +402,12 @@ Document{->EXEC(NamedEntities)};</pre
</div>
</div>
- <div class="section" title="2.7.14. FILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.filtertype">2.7.14. FILTERTYPE</h3></div></div></div>
+ <div class="section" title="2.7.14. FILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.filtertype">2.7.14. FILTERTYPE</h3></div></div></div>
<p>
This action filters the given types of annotations. They are now
ignored by rules. Expressions are not yet supported.
- This action is related to RETAINTYPE (see <a class="xref" href="#ugr.tools.tm.language.actions.retaintype" title="2.7.33. RETAINTYPE">Section 2.7.33, “RETAINTYPE”</a>).
+ This action is related to RETAINTYPE (see <a class="xref" href="#ugr.tools.ruta.language.actions.retaintype" title="2.7.33. RETAINTYPE">Section 2.7.33, “RETAINTYPE”</a>).
</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
<p>
@@ -449,7 +449,7 @@ Document{->EXEC(NamedEntities)};</pre
</div>
</div>
- <div class="section" title="2.7.15. GATHER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.gather">2.7.15. GATHER</h3></div></div></div>
+ <div class="section" title="2.7.15. GATHER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.gather">2.7.15. GATHER</h3></div></div></div>
<p>
This action creates a complex structure: an annotation with
@@ -490,7 +490,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
</div>
</div>
- <div class="section" title="2.7.16. GET"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.get">2.7.16. GET</h3></div></div></div>
+ <div class="section" title="2.7.16. GET"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.get">2.7.16. GET</h3></div></div></div>
<p>
The GET action retrieves an element of the given list dependent on a
@@ -522,7 +522,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
</div>
</div>
- <div class="section" title="2.7.17. GETFEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.getfeature">2.7.17. GETFEATURE</h3></div></div></div>
+ <div class="section" title="2.7.17. GETFEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.getfeature">2.7.17. GETFEATURE</h3></div></div></div>
<p>
The GETFEATURE action stores the value of the matched
@@ -551,7 +551,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
</div>
</div>
- <div class="section" title="2.7.18. GETLIST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.getlist">2.7.18. GETLIST</h3></div></div></div>
+ <div class="section" title="2.7.18. GETLIST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.getlist">2.7.18. GETLIST</h3></div></div></div>
<p>
This action retrieves a list of types dependent on a given strategy.
@@ -587,7 +587,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
</div>
</div>
- <div class="section" title="2.7.19. LOG"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.log">2.7.19. LOG</h3></div></div></div>
+ <div class="section" title="2.7.19. LOG"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.log">2.7.19. LOG</h3></div></div></div>
<p>
The LOG action writes a log message.
@@ -613,7 +613,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
</div>
</div>
- <div class="section" title="2.7.20. MARK"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.mark">2.7.20. MARK</h3></div></div></div>
+ <div class="section" title="2.7.20. MARK"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.mark">2.7.20. MARK</h3></div></div></div>
<p>
The MARK action is the most important action in the Ruta
@@ -647,7 +647,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
</div>
</div>
- <div class="section" title="2.7.21. MARKFAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.markfast">2.7.21. MARKFAST</h3></div></div></div>
+ <div class="section" title="2.7.21. MARKFAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markfast">2.7.21. MARKFAST</h3></div></div></div>
<p>
The MARKFAST action creates annotations of the given type (first
@@ -662,7 +662,7 @@ A B{-> GATHER(C, 1, 2, "a" = 1, "b" =
parameter is set to true by default and specifies whether whitespaces
in the entries of the dictionary should be ignored. For more
information on lists see
- <a class="xref" href="#ugr.tools.tm.language.declarations.ressource" title="2.4.3. Resources">Section 2.4.3, “Resources”</a>.
+ <a class="xref" href="#ugr.tools.ruta.language.declarations.ressource" title="2.4.3. Resources">Section 2.4.3, “Resources”</a>.
Additionally to external word lists, string lists variables can be
used.
</p>
@@ -695,7 +695,7 @@ Document{-> MARKFAST(FirstName, First
</div>
</div>
- <div class="section" title="2.7.22. MARKLAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.marklast">2.7.22. MARKLAST</h3></div></div></div>
+ <div class="section" title="2.7.22. MARKLAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.marklast">2.7.22. MARKLAST</h3></div></div></div>
<p>
The MARKLAST action annotates the last token of the matched
@@ -723,7 +723,7 @@ Document{-> MARKFAST(FirstName, First
</div>
</div>
- <div class="section" title="2.7.23. MARKONCE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.markonce">2.7.23. MARKONCE</h3></div></div></div>
+ <div class="section" title="2.7.23. MARKONCE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markonce">2.7.23. MARKONCE</h3></div></div></div>
<p>
The MARKONCE action has the same functionality as the MARK
@@ -755,7 +755,7 @@ Document{-> MARKFAST(FirstName, First
</div>
</div>
- <div class="section" title="2.7.24. MARKSCORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.markscore">2.7.24. MARKSCORE</h3></div></div></div>
+ <div class="section" title="2.7.24. MARKSCORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markscore">2.7.24. MARKSCORE</h3></div></div></div>
<p>
The MARKSCORE action is similar to the MARK action. It also creates a
@@ -765,7 +765,7 @@ Document{-> MARKFAST(FirstName, First
information of several rule elements. Additionally, a score value
(first parameter) is added to the heuristic score value of the
annotation. For more information on heuristic scores see
- <a class="xref" href="#ugr.tools.tm.language.score" title="2.10. Heuristic extraction using scoring rules">Section 2.10, “Heuristic extraction using scoring rules”</a>
+ <a class="xref" href="#ugr.tools.ruta.language.score" title="2.10. Heuristic extraction using scoring rules">Section 2.10, “Heuristic extraction using scoring rules”</a>
.
</p>
<div class="section" title="2.7.24.1. Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1719">2.7.24.1.
@@ -795,7 +795,7 @@ Document{-> MARKFAST(FirstName, First
</div>
</div>
- <div class="section" title="2.7.25. MARKTABLE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.marktable">2.7.25. MARKTABLE</h3></div></div></div>
+ <div class="section" title="2.7.25. MARKTABLE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.marktable">2.7.25. MARKTABLE</h3></div></div></div>
<p>
The MARKTABLE action creates annotations of the given type (first
@@ -807,7 +807,7 @@ Document{-> MARKFAST(FirstName, First
entries of the given table to features of the created annotation.
For
more information on tables see
- <a class="xref" href="#ugr.tools.tm.language.declarations.ressource" title="2.4.3. Resources">Section 2.4.3, “Resources”</a>. Additionally, several configuration parameters are possible. (See example.)
+ <a class="xref" href="#ugr.tools.ruta.language.declarations.ressource" title="2.4.3. Resources">Section 2.4.3, “Resources”</a>. Additionally, several configuration parameters are possible. (See example.)
</p>
<div class="section" title="2.7.25.1. Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1734">2.7.25.1.
<span class="bold"><strong>Definition:</strong></span>
@@ -842,7 +842,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.26. MATCHEDTEXT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.matchedtext">2.7.26. MATCHEDTEXT</h3></div></div></div>
+ <div class="section" title="2.7.26. MATCHEDTEXT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.matchedtext">2.7.26. MATCHEDTEXT</h3></div></div></div>
<p>
The MATCHEDTEXT action saves the text of the matched annotation
@@ -872,7 +872,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.27. MERGE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.merge">2.7.27. MERGE</h3></div></div></div>
+ <div class="section" title="2.7.27. MERGE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.merge">2.7.27. MERGE</h3></div></div></div>
<p>
The MERGE action merges a number of given lists. The first
@@ -902,7 +902,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.28. REMOVE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.remove">2.7.28. REMOVE</h3></div></div></div>
+ <div class="section" title="2.7.28. REMOVE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.remove">2.7.28. REMOVE</h3></div></div></div>
<p>
The REMOVE action removes lists or single values from a given
@@ -930,7 +930,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.29. REMOVEDUPLICATE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.removeduplicate">2.7.29. REMOVEDUPLICATE</h3></div></div></div>
+ <div class="section" title="2.7.29. REMOVEDUPLICATE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.removeduplicate">2.7.29. REMOVEDUPLICATE</h3></div></div></div>
<p>
This action removes all duplicates within a given list.
@@ -956,7 +956,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.30. REMOVEFILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.removefiltertype">2.7.30. REMOVEFILTERTYPE</h3></div></div></div>
+ <div class="section" title="2.7.30. REMOVEFILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.removefiltertype">2.7.30. REMOVEFILTERTYPE</h3></div></div></div>
<p>
The REMOVEFILTERTYPE action removes its arguments from the list of filtered types,
@@ -983,7 +983,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.31. REMOVERETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.removeretaintype">2.7.31. REMOVERETAINTYPE</h3></div></div></div>
+ <div class="section" title="2.7.31. REMOVERETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.removeretaintype">2.7.31. REMOVERETAINTYPE</h3></div></div></div>
<p>
The REMOVEFILTERTYPE action removes its arguments from the list of retained types,
@@ -1011,13 +1011,13 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
- <div class="section" title="2.7.32. REPLACE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.replace">2.7.32. REPLACE</h3></div></div></div>
+ <div class="section" title="2.7.32. REPLACE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.replace">2.7.32. REPLACE</h3></div></div></div>
<p>
The REPLACE action replaces the text of all matched annotations with
the given StringExpression. It remembers the modification for the
matched annotations and shows them in the modified view (see
- <a class="xref" href="#ugr.tools.tm.language.modification" title="2.11. Modification">Section 2.11, “Modification”</a>).
+ <a class="xref" href="#ugr.tools.ruta.language.modification" title="2.11. Modification">Section 2.11, “Modification”</a>).
</p>
<div class="section" title="2.7.32.1. Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1833">2.7.32.1.
<span class="bold"><strong>Definition:</strong></span>
@@ -1041,12 +1041,12 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.33. RETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.retaintype">2.7.33. RETAINTYPE</h3></div></div></div>
+ <div class="section" title="2.7.33. RETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.retaintype">2.7.33. RETAINTYPE</h3></div></div></div>
<p>
The RETAINTYPE action retains the given types. This means that they
are now not ignored by rules. This action is related to
- FILTERTYPE (see <a class="xref" href="#ugr.tools.tm.language.actions.filtertype" title="2.7.14. FILTERTYPE">Section 2.7.14, “FILTERTYPE”</a>).
+ FILTERTYPE (see <a class="xref" href="#ugr.tools.ruta.language.actions.filtertype" title="2.7.14. FILTERTYPE">Section 2.7.14, “FILTERTYPE”</a>).
</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
<p>
@@ -1087,7 +1087,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.34. SETFEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.setfeature">2.7.34. SETFEATURE</h3></div></div></div>
+ <div class="section" title="2.7.34. SETFEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.setfeature">2.7.34. SETFEATURE</h3></div></div></div>
<p>
The SETFEATURE action sets the value of a feature of the
@@ -1116,7 +1116,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.35. SHIFT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.shift">2.7.35. SHIFT</h3></div></div></div>
+ <div class="section" title="2.7.35. SHIFT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.shift">2.7.35. SHIFT</h3></div></div></div>
<p>
The SHIFT action can be used to change the offsets of an annotation. The optional number expressions,
@@ -1153,7 +1153,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.36. TRANSFER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.transfer">2.7.36. TRANSFER</h3></div></div></div>
+ <div class="section" title="2.7.36. TRANSFER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.transfer">2.7.36. TRANSFER</h3></div></div></div>
<p>
The TRANSFER action creates a new feature structure and adds all
@@ -1183,7 +1183,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.37. TRIE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.trie">2.7.37. TRIE</h3></div></div></div>
+ <div class="section" title="2.7.37. TRIE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.trie">2.7.37. TRIE</h3></div></div></div>
<p>
The TRIE action uses an external multi tree word list to
@@ -1221,7 +1221,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
-<div class="section" title="2.7.38. TRIM"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.trim">2.7.38. TRIM</h3></div></div></div>
+<div class="section" title="2.7.38. TRIM"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.trim">2.7.38. TRIM</h3></div></div></div>
<p>
The TRIM action changes the offsets on the matched annotations by removing annotations, whose
@@ -1250,7 +1250,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.39. UNMARK"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.unmark">2.7.39. UNMARK</h3></div></div></div>
+ <div class="section" title="2.7.39. UNMARK"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.unmark">2.7.39. UNMARK</h3></div></div></div>
<p>
The UNMARK action removes the annotation of the given type
@@ -1294,7 +1294,7 @@ Document{-> MARKTABLE(Struct, 1, Test
</div>
</div>
- <div class="section" title="2.7.40. UNMARKALL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.actions.unmarkall">2.7.40. UNMARKALL</h3></div></div></div>
+ <div class="section" title="2.7.40. UNMARKALL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.unmarkall">2.7.40. UNMARKALL</h3></div></div></div>
<p>
The UNMARKALL action removes all the annotations of the given
Modified: uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html Wed May 1 15:21:51 2013
@@ -1,4 +1,4 @@
- <div class="section" title="2.6.1. AFTER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.after">2.6.1. AFTER</h3></div></div></div>
+ <div class="section" title="2.6.1. AFTER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.after">2.6.1. AFTER</h3></div></div></div>
<p>
The AFTER condition evaluates true, if the matched annotation
@@ -28,7 +28,7 @@
</div>
</div>
- <div class="section" title="2.6.2. AND"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.and">2.6.2. AND</h3></div></div></div>
+ <div class="section" title="2.6.2. AND"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.and">2.6.2. AND</h3></div></div></div>
<p>
The AND condition is a composed condition and evaluates true, if
@@ -58,7 +58,7 @@
</div>
</div>
- <div class="section" title="2.6.3. BEFORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.before">2.6.3. BEFORE</h3></div></div></div>
+ <div class="section" title="2.6.3. BEFORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.before">2.6.3. BEFORE</h3></div></div></div>
<p>
The BEFORE condition evaluates true, if the matched annotation
@@ -88,7 +88,7 @@
</div>
</div>
- <div class="section" title="2.6.4. CONTAINS"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.contains">2.6.4. CONTAINS</h3></div></div></div>
+ <div class="section" title="2.6.4. CONTAINS"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.contains">2.6.4. CONTAINS</h3></div></div></div>
<p>
The CONTAINS condition evaluates true on a matched annotation,
@@ -138,14 +138,14 @@
contains between 50% and 100% Keyword annotations. This is
calculated based on the tokens of the Paragraph. If the Paragraph
contains six basic annotations (see
- <a class="xref" href="#ugr.tools.tm.language.seeding" title="2.2. Basic annotations and tokens">Section 2.2, “Basic annotations and tokens”</a>), two of them are part of one Keyword annotation, and if one basic
+ <a class="xref" href="#ugr.tools.ruta.language.seeding" title="2.2. Basic annotations and tokens">Section 2.2, “Basic annotations and tokens”</a>), two of them are part of one Keyword annotation, and if one basic
annotation is also annotated with a Keyword annotation, then the
percentage of the contained Keywords is 50%.
</p>
</div>
</div>
- <div class="section" title="2.6.5. CONTEXTCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.contextcount">2.6.5. CONTEXTCOUNT</h3></div></div></div>
+ <div class="section" title="2.6.5. CONTEXTCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.contextcount">2.6.5. CONTEXTCOUNT</h3></div></div></div>
<p>
The CONTEXTCOUNT condition numbers all occurrences of the
@@ -182,7 +182,7 @@
</div>
</div>
- <div class="section" title="2.6.6. COUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.count">2.6.6. COUNT</h3></div></div></div>
+ <div class="section" title="2.6.6. COUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.count">2.6.6. COUNT</h3></div></div></div>
<p>
The COUNT condition can be used in two different ways. In the
@@ -236,7 +236,7 @@
</div>
</div>
- <div class="section" title="2.6.7. CURRENTCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.currentcount">2.6.7. CURRENTCOUNT</h3></div></div></div>
+ <div class="section" title="2.6.7. CURRENTCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.currentcount">2.6.7. CURRENTCOUNT</h3></div></div></div>
<p>
The CURRENTCOUNT condition numbers all occurences of the matched
@@ -270,7 +270,7 @@
</div>
</div>
- <div class="section" title="2.6.8. ENDSWITH"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.endswith">2.6.8. ENDSWITH</h3></div></div></div>
+ <div class="section" title="2.6.8. ENDSWITH"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.endswith">2.6.8. ENDSWITH</h3></div></div></div>
<p>
The ENDSWITH condition evaluates true, if an annotation of the
@@ -300,7 +300,7 @@
</div>
</div>
- <div class="section" title="2.6.9. FEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.feature">2.6.9. FEATURE</h3></div></div></div>
+ <div class="section" title="2.6.9. FEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.feature">2.6.9. FEATURE</h3></div></div></div>
<p>
The FEATURE condition compares a feature of the matched
@@ -329,7 +329,7 @@
</div>
</div>
- <div class="section" title="2.6.10. IF"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.if">2.6.10. IF</h3></div></div></div>
+ <div class="section" title="2.6.10. IF"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.if">2.6.10. IF</h3></div></div></div>
<p>
The IF condition evaluates true, if the contained boolean
@@ -358,7 +358,7 @@
</div>
</div>
- <div class="section" title="2.6.11. INLIST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.inlist">2.6.11. INLIST</h3></div></div></div>
+ <div class="section" title="2.6.11. INLIST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.inlist">2.6.11. INLIST</h3></div></div></div>
<p>
The INLIST condition is fulfilled, if the matched annotation is listed
@@ -392,7 +392,7 @@
</div>
</div>
- <div class="section" title="2.6.12. IS"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.is">2.6.12. IS</h3></div></div></div>
+ <div class="section" title="2.6.12. IS"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.is">2.6.12. IS</h3></div></div></div>
<p>
The IS condition evaluates true, if there is an annotation of the
@@ -424,7 +424,7 @@
</div>
</div>
- <div class="section" title="2.6.13. LAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.last">2.6.13. LAST</h3></div></div></div>
+ <div class="section" title="2.6.13. LAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.last">2.6.13. LAST</h3></div></div></div>
<p>
The LAST condition evaluates true, if the type of the last token
@@ -452,7 +452,7 @@
</div>
</div>
- <div class="section" title="2.6.14. MOFN"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.mofn">2.6.14. MOFN</h3></div></div></div>
+ <div class="section" title="2.6.14. MOFN"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.mofn">2.6.14. MOFN</h3></div></div></div>
<p>
The MOFN condition is a composed condition. It evaluates true if
@@ -483,7 +483,7 @@
</div>
</div>
- <div class="section" title="2.6.15. NEAR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.near">2.6.15. NEAR</h3></div></div></div>
+ <div class="section" title="2.6.15. NEAR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.near">2.6.15. NEAR</h3></div></div></div>
<p>
The NEAR condition is fulfilled, if the distance of the matched
@@ -517,7 +517,7 @@
</div>
</div>
- <div class="section" title="2.6.16. NOT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.not">2.6.16. NOT</h3></div></div></div>
+ <div class="section" title="2.6.16. NOT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.not">2.6.16. NOT</h3></div></div></div>
<p>
The NOT condition negates the result of its contained
@@ -545,7 +545,7 @@
</div>
</div>
- <div class="section" title="2.6.17. OR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.or">2.6.17. OR</h3></div></div></div>
+ <div class="section" title="2.6.17. OR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.or">2.6.17. OR</h3></div></div></div>
<p>
The OR Condition is a composed condition and evaluates true, if
@@ -575,7 +575,7 @@
</div>
</div>
- <div class="section" title="2.6.18. PARSE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.parse">2.6.18. PARSE</h3></div></div></div>
+ <div class="section" title="2.6.18. PARSE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.parse">2.6.18. PARSE</h3></div></div></div>
<p>
The PARSE condition is fulfilled, if the text covered by the
@@ -605,7 +605,7 @@
</div>
</div>
- <div class="section" title="2.6.19. PARTOF"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.partof">2.6.19. PARTOF</h3></div></div></div>
+ <div class="section" title="2.6.19. PARTOF"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.partof">2.6.19. PARTOF</h3></div></div></div>
<p>
The PARTOF condition is fulfilled, if the matched annotation is
@@ -638,7 +638,7 @@
</div>
</div>
- <div class="section" title="2.6.20. PARTOFNEQ"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.partofneq">2.6.20. PARTOFNEQ</h3></div></div></div>
+ <div class="section" title="2.6.20. PARTOFNEQ"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.partofneq">2.6.20. PARTOFNEQ</h3></div></div></div>
<p>
The PARTOFNEQ condition is fulfilled if the matched annotation
@@ -669,7 +669,7 @@
</div>
</div>
- <div class="section" title="2.6.21. POSITION"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.position">2.6.21. POSITION</h3></div></div></div>
+ <div class="section" title="2.6.21. POSITION"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.position">2.6.21. POSITION</h3></div></div></div>
<p>
The POSITION condition is fulfilled, if the matched type is the
@@ -709,7 +709,7 @@
</div>
</div>
- <div class="section" title="2.6.22. REGEXP"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.regexp">2.6.22. REGEXP</h3></div></div></div>
+ <div class="section" title="2.6.22. REGEXP"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.regexp">2.6.22. REGEXP</h3></div></div></div>
<p>
The REGEXP condition is fulfilled, if the given pattern matches on the
@@ -747,7 +747,7 @@
</div>
</div>
- <div class="section" title="2.6.23. SCORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.score">2.6.23. SCORE</h3></div></div></div>
+ <div class="section" title="2.6.23. SCORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.score">2.6.23. SCORE</h3></div></div></div>
<p>
The SCORE condition evaluates the heuristic score of the matched
@@ -780,7 +780,7 @@
</div>
</div>
- <div class="section" title="2.6.24. SIZE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.size">2.6.24. SIZE</h3></div></div></div>
+ <div class="section" title="2.6.24. SIZE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.size">2.6.24. SIZE</h3></div></div></div>
<p>
The SIZE contition counts the number of elements in the given
@@ -812,7 +812,7 @@
</div>
</div>
- <div class="section" title="2.6.25. STARTSWITH"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.startswith">2.6.25. STARTSWITH</h3></div></div></div>
+ <div class="section" title="2.6.25. STARTSWITH"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.startswith">2.6.25. STARTSWITH</h3></div></div></div>
<p>
The STARTSWITH condition evaluates true, if an annotation of the
@@ -842,7 +842,7 @@
</div>
</div>
- <div class="section" title="2.6.26. TOTALCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.totalcount">2.6.26. TOTALCOUNT</h3></div></div></div>
+ <div class="section" title="2.6.26. TOTALCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.totalcount">2.6.26. TOTALCOUNT</h3></div></div></div>
<p>
The TOTALCOUNT condition counts the annotations of the passed
@@ -876,7 +876,7 @@
</div>
</div>
- <div class="section" title="2.6.27. VOTE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.tm.language.conditions.vote">2.6.27. VOTE</h3></div></div></div>
+ <div class="section" title="2.6.27. VOTE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.vote">2.6.27. VOTE</h3></div></div></div>
<p>
The VOTE condition counts the annotations of the given two types
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java Wed May 1 15:21:51 2013
@@ -120,8 +120,7 @@ public abstract class TextRulerBasicLear
// the FILTERTYPE expression!
String tempRulesFileName = getTempRulesFileName();
IPath path = new Path(tempRulesFileName);
- ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension()
- .lastSegment());
+ ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension().lastSegment());
String portableString = path.removeLastSegments(1).toPortableString();
ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { portableString });
ae.setConfigParameterValue(RutaEngine.ADDITIONAL_SCRIPTS, new String[0]);
@@ -194,7 +193,7 @@ public abstract class TextRulerBasicLear
if (TextRulerToolkit.DEBUG) {
try {
- File file = new File(tempDirectory() + "results.tm");
+ File file = new File(tempDirectory() + "results" + RutaEngine.SCRIPT_FILE_EXTENSION);
FileUtils.saveString2File(getResultString(), file);
} catch (Exception e) {
TextRulerPlugin.error(e);
@@ -238,11 +237,11 @@ public abstract class TextRulerBasicLear
}
public String getTempRulesFileName() {
- return tempDirectory() + "rules.tm";
+ return tempDirectory() + "rules" + RutaEngine.SCRIPT_FILE_EXTENSION;
}
public String getIntermediateRulesFileName() {
- return tempDirectory() + "intermediaterules.tm";
+ return tempDirectory() + "intermediaterules" + RutaEngine.SCRIPT_FILE_EXTENSION;
}
public void compareOriginalDocumentWithTestCAS(TextRulerExampleDocument originalDoc, CAS testCas,
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java Wed May 1 15:21:51 2013
@@ -137,7 +137,7 @@ public class TextRulerExampleDocument {
resetAndFillTestCAS(testCAS, target);
CAS docCAS = getCAS();
TypeSystem ts = docCAS.getTypeSystem();
- Type tokensRootType = ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME);
+ Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
AnalysisEngine analysisEngine = learner.getAnalysisEngine();
try {
analysisEngine.process(testCAS);
@@ -302,7 +302,7 @@ public class TextRulerExampleDocument {
List<AnnotationFS> slotTokens = TextRulerToolkit.getAnnotationsWithinBounds(aCas, a
.getBegin(), a.getEnd(), TextRulerToolkit.getFilterSetWithSlotName(slotName,
- tokenFilterSet), ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME));
+ tokenFilterSet), ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME));
AnnotationFS first = slotTokens.get(0);
AnnotationFS last = slotTokens.get(slotTokens.size() - 1);
Type typeLB = ts.getType(slotName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION);
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java Wed May 1 15:21:51 2013
@@ -163,7 +163,7 @@ public class TextRulerExampleDocumentSet
List<AnnotationFS> slotTokens = TextRulerToolkit.getAnnotationsWithinBounds(aCas, a
.getBegin(), a.getEnd(), TextRulerToolkit.getFilterSetWithSlotName(slotName,
- filterSet), ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME));
+ filterSet), ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME));
int len = slotTokens.size();
if (len > maxLen)
maxLen = len;
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java Wed May 1 15:21:51 2013
@@ -67,23 +67,23 @@ public class TextRulerToolkit {
public static final boolean DEBUG = false;
- public static final String TM_ALL_TYPE_NAME = "org.apache.uima.ruta.type.ALL";
+ public static final String RUTA_ALL_TYPE_NAME = "org.apache.uima.ruta.type.ALL";
- public static final String TM_ANY_TYPE_NAME = "org.apache.uima.ruta.type.ANY";
+ public static final String RUTA_ANY_TYPE_NAME = "org.apache.uima.ruta.type.ANY";
- public static final String TM_WORD_TYPE_NAME = "org.apache.uima.ruta.type.W";
+ public static final String RUTA_WORD_TYPE_NAME = "org.apache.uima.ruta.type.W";
- public static final String TM_BREAK_TYPE_NAME = "org.apache.uima.ruta.type.BREAK";
+ public static final String RUTA_BREAK_TYPE_NAME = "org.apache.uima.ruta.type.BREAK";
- public static final String TM_SPACE_TYPE_NAME = "org.apache.uima.ruta.type.SPACE";
+ public static final String RUTA_SPACE_TYPE_NAME = "org.apache.uima.ruta.type.SPACE";
- public static final String TM_NUM_TYPE_NAME = "org.apache.uima.ruta.type.NUM";
+ public static final String RUTA_NUM_TYPE_NAME = "org.apache.uima.ruta.type.NUM";
- public static final String TM_MARKUP_TYPE_NAME = "org.apache.uima.ruta.type.MARKUP";
+ public static final String RUTA_MARKUP_TYPE_NAME = "org.apache.uima.ruta.type.MARKUP";
- public static final String TM_SPECIAL_TYPE_NAME = "org.apache.uima.ruta.type.SPECIAL";
+ public static final String RUTA_SPECIAL_TYPE_NAME = "org.apache.uima.ruta.type.SPECIAL";
- public static final String TM_NBSP_TYPE_NAME = "org.apache.uima.ruta.type.NBSP";
+ public static final String RUTA_NBSP_TYPE_NAME = "org.apache.uima.ruta.type.NBSP";
public static final String LEFT_BOUNDARY_EXTENSION = "START";
@@ -108,13 +108,6 @@ public class TextRulerToolkit {
return FileLocator.find(TextRulerPlugin.getDefault().getBundle(), new Path(name), null);
}
- // public static AnalysisEngine loadAnalysisEngine()
- // {
- // URL u = TextRulerToolkit.getResourceURL("desc/MLEngine.xml"); // this was
- // a predefined engine file in the plugin. got removed now since we load the
- // // engine file of the given preprocessing file!
- // return loadAnalysisEngine(u);
- // }
public static AnalysisEngine loadAnalysisEngine(String descFile) {
AnalysisEngine result = null;
@@ -299,7 +292,7 @@ public class TextRulerToolkit {
FSIterator<AnnotationFS> leftIt = null;
FSIterator<AnnotationFS> rightIt = null;
TypeSystem ts = aCas.getTypeSystem();
- Type tmRootType = ts.getType(TM_ALL_TYPE_NAME);
+ Type tmRootType = ts.getType(RUTA_ALL_TYPE_NAME);
Set<String> allFilters = new HashSet<String>();
allFilters.add("uima.tcas.DocumentAnnotation");
allFilters.add(RutaEngine.BASIC_TYPE);
@@ -381,10 +374,10 @@ public class TextRulerToolkit {
for (String s : slotNames)
filterSet.add(s);
}
- filterSet.add(TM_SPACE_TYPE_NAME);
- filterSet.add(TM_BREAK_TYPE_NAME);
- filterSet.add(TM_MARKUP_TYPE_NAME);
- filterSet.add(TM_NBSP_TYPE_NAME);
+ filterSet.add(RUTA_SPACE_TYPE_NAME);
+ filterSet.add(RUTA_BREAK_TYPE_NAME);
+ filterSet.add(RUTA_MARKUP_TYPE_NAME);
+ filterSet.add(RUTA_NBSP_TYPE_NAME);
return filterSet;
}
@@ -460,7 +453,7 @@ public class TextRulerToolkit {
IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
IPath projectPath = folder.removeLastSegments(1);
String elementName = scriptFilePath.lastSegment();
- int lastIndexOf = elementName.lastIndexOf(".tm");
+ int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);
if (lastIndexOf != -1) {
elementName = elementName.substring(0, lastIndexOf);
}
@@ -478,7 +471,7 @@ public class TextRulerToolkit {
IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
IPath projectPath = folder.removeLastSegments(1);
String elementName = scriptFilePath.lastSegment();
- int lastIndexOf = elementName.lastIndexOf(".tm");
+ int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);
if (lastIndexOf != -1) {
elementName = elementName.substring(0, lastIndexOf);
}
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java Wed May 1 15:21:51 2013
@@ -48,11 +48,9 @@ public class TextRulerWordConstraint {
super();
this.tokenAnnotation = tokenAnnotation;
TypeSystem ts = tokenAnnotation.getDocument().getCAS().getTypeSystem();
- Type wType = ts.getType(TextRulerToolkit.TM_WORD_TYPE_NAME);
- Type numType = ts.getType(TextRulerToolkit.TM_NUM_TYPE_NAME);
- Type markupType = ts.getType(TextRulerToolkit.TM_MARKUP_TYPE_NAME);
- // TODO special auch wieder einschalten!? !!!!!
- // Type specialType = ts.getType(TextRulerToolkit.TM_SPECIAL_TYPE_NAME);
+ Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
+ Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
+ Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
|| ts.subsumes(markupType, tokenAnnotation.getType())
|| ts.subsumes(numType, tokenAnnotation.getType())
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java Wed May 1 15:21:51 2013
@@ -53,27 +53,6 @@ public class TextRulerPreprocessor {
try {
outputFolder.mkdir();
- // FileUtils.saveString2File("PACKAGE org.apache.uima;\n\n", new
- // File(tmpDir+"preprocess.tm"));
- // ae.setConfigParameterValue(RutaEngine.SCRIPT_LOCATION,
- // tmpDir+"preprocess.tm");
- // IPath path = new Path(tmFile);
- // IPath scriptRoot = new Path(tmFile);
- // while (!scriptRoot.lastSegment().equals(RutaProjectUtils.getDefaultScriptLocation()))
- // {
- // scriptRoot = scriptRoot.removeLastSegments(1);
- // }
- // IPath makeRelativeTo = path.makeRelativeTo(scriptRoot);
- //
- // String replaceAll =
- // makeRelativeTo.removeFileExtension().toPortableString().replaceAll("[/]",
- // ".");
- // Object configParameterValue = ae.getConfigParameterValue(RutaEngine.MAIN_SCRIPT);
- // ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, replaceAll);
- // ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { scriptRoot
- // .toPortableString() });
- // ae.setConfigParameterValue(RutaEngine.USE_SCANNER, true);
- // ae.reconfigure();
} catch (Exception e) {
TextRulerPlugin.error(e);
return null;
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java Wed May 1 15:21:51 2013
@@ -32,6 +32,7 @@ import org.apache.uima.cas.CAS;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.TypeSystem;
import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.ruta.engine.RutaEngine;
import org.apache.uima.ruta.textruler.TextRulerPlugin;
import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
@@ -301,15 +302,16 @@ public abstract class BasicLP2 extends T
protected void addToFinalContextRulesPool(LP2Rule rule) {
if (TextRulerToolkit.DEBUG)
- TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxpool.tm", rule.getRuleString()
- + "\n");
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxpool"
+ + RutaEngine.SCRIPT_FILE_EXTENSION, rule.getRuleString() + "\n");
String slotName = rule.getTarget().getSingleSlotRawTypeName();
if (!contextRulesPoolMap.get(slotName).contains(rule)) {
contextRulesPoolMap.get(slotName).add(rule);
// TextRulerToolkit.log("CONTEXT RULE: "+rule.getRuleString()+" ; "+rule.getCoveringStatistics());
} else {
if (TextRulerToolkit.DEBUG) {
- TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxpool.tm", "\tDUPLICATE\n");
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxpool"
+ + RutaEngine.SCRIPT_FILE_EXTENSION, "\tDUPLICATE\n");
}
}
@@ -317,8 +319,8 @@ public abstract class BasicLP2 extends T
protected void addToFinalBestRulesPool(LP2Rule rule) {
if (TextRulerToolkit.DEBUG && false)
- TextRulerToolkit.appendStringToFile(tempDirectory() + "bestpool.tm", rule.getRuleString()
- + "\n");
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "bestpool"
+ + RutaEngine.SCRIPT_FILE_EXTENSION, rule.getRuleString() + "\n");
String slotName = rule.getTarget().getSingleSlotRawTypeName();
if (!bestRulesPoolMap.get(slotName).contains(rule)) {
bestRulesPoolMap.get(slotName).add(rule);
@@ -331,7 +333,8 @@ public abstract class BasicLP2 extends T
} else {
if (TextRulerToolkit.DEBUG && false) {
TextRulerToolkit.log("KANN SOWAS PASSIEREN ??");
- TextRulerToolkit.appendStringToFile(tempDirectory() + "bestpool.tm", "\tDUPLICATE\n");
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "bestpool"
+ + RutaEngine.SCRIPT_FILE_EXTENSION, "\tDUPLICATE\n");
}
}
@@ -410,7 +413,7 @@ public abstract class BasicLP2 extends T
}
private Integer getMaxTokens(String slot) {
- if(slotMaximumTokenCountMap.get(slot) == null) {
+ if (slotMaximumTokenCountMap.get(slot) == null) {
return 0;
}
return slotMaximumTokenCountMap.get(slot);
@@ -457,10 +460,11 @@ public abstract class BasicLP2 extends T
TextRulerExampleDocument[] sortedDocs = exampleDocuments
.getSortedDocumentsInCacheOptimizedOrder();
TypeSystem ts = sortedDocs[0].getCAS().getTypeSystem();
- Type tokensRootType = ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME);
+ Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
// String allRulesContent = getResultString();
- String allRulesContent = FileUtils.file2String(new File("/testinput/testrules/rules.tm"));
+ String allRulesContent = FileUtils.file2String(new File("/testinput/testrules/rules"
+ + RutaEngine.SCRIPT_FILE_EXTENSION));
FileUtils.saveString2File(allRulesContent, new File(getTempRulesFileName()));
CAS testCAS = getTestCAS();
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java Wed May 1 15:21:51 2013
@@ -30,6 +30,7 @@ import org.apache.uima.cas.CAS;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.TypeSystem;
import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.ruta.engine.RutaEngine;
import org.apache.uima.ruta.textruler.TextRulerPlugin;
import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
import org.apache.uima.ruta.textruler.core.TextRulerExample;
@@ -106,7 +107,7 @@ public class NaiveLP2 extends BasicLP2 {
String startend = e.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY ? "left_"
: "right_";
- File file = new File(tempDirectory() + startend + "generalizations" + roundNumber + ".tm");
+ File file = new File(tempDirectory() + startend + "generalizations" + roundNumber + RutaEngine.SCRIPT_FILE_EXTENSION);
StringBuffer str = new StringBuffer();
for (TextRulerRule rule : test) {
str.append(rule.getCoveringStatistics() + "\t\t" + rule.getRuleString() + "\n");
@@ -127,7 +128,7 @@ public class NaiveLP2 extends BasicLP2 {
boolean isBestRule = !(tooFewPositives || tooManyErrors);
if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
- TextRulerToolkit.appendStringToFile(tempDirectory() + "bestcandidates.tm",
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "bestcandidates"+RutaEngine.SCRIPT_FILE_EXTENSION,
rule.getRuleString() + "\n");
if (isBestRule) {
@@ -155,7 +156,7 @@ public class NaiveLP2 extends BasicLP2 {
rule.setNeedsCompile(true);
if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
- TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxcandidates.tm",
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxcandidates"+RutaEngine.SCRIPT_FILE_EXTENSION,
rule.getRuleString());
testRuleOnDocumentSet(rule, exampleDocuments); // not very
@@ -206,7 +207,7 @@ public class NaiveLP2 extends BasicLP2 {
CAS docCas = example.getDocumentCAS();
TextRulerAnnotation exampleAnnotation = example.getAnnotation();
TypeSystem ts = docCas.getTypeSystem();
- Type tokensRootType = ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME);
+ Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
int thePosition = target.type == MLTargetType.SINGLE_LEFT_BOUNDARY ? exampleAnnotation
.getBegin() : exampleAnnotation.getEnd();
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java Wed May 1 15:21:51 2013
@@ -32,6 +32,7 @@ import org.apache.uima.cas.CAS;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.TypeSystem;
import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.ruta.engine.RutaEngine;
import org.apache.uima.ruta.textruler.TextRulerPlugin;
import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
import org.apache.uima.ruta.textruler.core.TextRulerExample;
@@ -177,7 +178,8 @@ public class OptimizedLP2 extends BasicL
});
String startend = e.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY ? "left_"
: "right_";
- File file = new File(tempDirectory() + startend + "generalizations" + roundNumber + ".tm");
+ File file = new File(tempDirectory() + startend + "generalizations" + roundNumber
+ + RutaEngine.SCRIPT_FILE_EXTENSION);
StringBuffer str = new StringBuffer();
for (TextRulerRule rule : debugRuleCollector) {
str.append(rule.getCoveringStatistics() + "\t\t" + rule.getRuleString() + "\n");
@@ -359,8 +361,8 @@ public class OptimizedLP2 extends BasicL
boolean isBestRule = !(tooFewPositives || tooManyErrors);
if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
- TextRulerToolkit.appendStringToFile(tempDirectory() + "bestcandidates.tm",
- newRule.getRuleString() + "\n");
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "bestcandidates"
+ + RutaEngine.SCRIPT_FILE_EXTENSION, newRule.getRuleString() + "\n");
if (isBestRule) {
currentBestRules.add(newRule);
@@ -393,8 +395,8 @@ public class OptimizedLP2 extends BasicL
// + " ; "+newCTXRule.getCoveringStatistics());
if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
- TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxcandidates.tm",
- newCTXRule.getRuleString() + "\n");
+ TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxcandidates"
+ + RutaEngine.SCRIPT_FILE_EXTENSION, newCTXRule.getRuleString() + "\n");
if (isGoodCTXRule) {
currentContextualRules.add(newCTXRule);
@@ -473,7 +475,7 @@ public class OptimizedLP2 extends BasicL
CAS docCas = example.getDocumentCAS();
TextRulerAnnotation exampleAnnotation = example.getAnnotation();
TypeSystem ts = docCas.getTypeSystem();
- Type tokensRootType = ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME);
+ Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
boolean isLeftBoundary = (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY || target.type == MLTargetType.SINGLE_LEFT_CORRECTION);
int thePosition = isLeftBoundary ? exampleAnnotation.getBegin() : exampleAnnotation.getEnd();
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java Wed May 1 15:21:51 2013
@@ -207,7 +207,7 @@ public class Rapier extends TextRulerBas
TextRulerAnnotation slotAnnotation = example.getAnnotation();
CAS docCas = example.getDocumentCAS();
TypeSystem ts = docCas.getTypeSystem();
- Type tokensRootType = ts.getType(TextRulerToolkit.TM_ANY_TYPE_NAME);
+ Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
// first, get all words/tokens:
List<AnnotationFS> before = TextRulerToolkit.getAnnotationsBeforePosition(
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java Wed May 1 15:21:51 2013
@@ -613,7 +613,7 @@ public class Whisk extends TextRulerBasi
public List<WhiskRuleItem> getAllTermsOfExample(TextRulerExample example) {
CAS cas = example.getDocumentCAS();
- Type tokensRootType = cas.getTypeSystem().getType(TextRulerToolkit.TM_ANY_TYPE_NAME);
+ Type tokensRootType = cas.getTypeSystem().getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
List<AnnotationFS> all = TextRulerToolkit.getAnnotationsWithinBounds(cas, 0, cas
.getDocumentText().length() + 1, TextRulerToolkit.getFilterSetWithSlotNames(slotNames,
filterSet), tokensRootType);
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java Wed May 1 15:21:51 2013
@@ -389,7 +389,7 @@ public class Wien extends TextRulerBasic
TextRulerExample lastExample = doc.getPositiveExamples().get(
doc.getPositiveExamples().size() - 1);
TypeSystem ts = cas.getTypeSystem();
- Type tokenType = ts.getType(TextRulerToolkit.TM_ALL_TYPE_NAME);
+ Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
List<AnnotationFS> headTokens = TextRulerToolkit.getAnnotationsBeforePosition(cas,
firstExample.getAnnotations()[0].getBegin(), 0, TextRulerToolkit
.getFilterSetWithSlotNames(slotNames, filterSet), tokenType);
@@ -416,7 +416,7 @@ public class Wien extends TextRulerBasic
List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
CAS cas = doc.getCAS();
TypeSystem ts = cas.getTypeSystem();
- Type tokenType = ts.getType(TextRulerToolkit.TM_ALL_TYPE_NAME);
+ Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
List<TextRulerExample> examples = doc.getPositiveExamples();
for (int i = 0; i < examples.size() - 1; i++) {
// get separator between i'th and (i+1)'th example:
@@ -444,7 +444,7 @@ public class Wien extends TextRulerBasic
List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
CAS cas = doc.getCAS();
TypeSystem ts = cas.getTypeSystem();
- Type tokenType = ts.getType(TextRulerToolkit.TM_ALL_TYPE_NAME);
+ Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
List<TextRulerExample> examples = doc.getPositiveExamples();
boolean isLastSlot = slotIndex >= slotNames.length - 1;
for (int ei = 0; ei < examples.size(); ei++) {
@@ -488,7 +488,7 @@ public class Wien extends TextRulerBasic
List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
CAS cas = doc.getCAS();
TypeSystem ts = cas.getTypeSystem();
- Type tokenType = ts.getType(TextRulerToolkit.TM_ALL_TYPE_NAME);
+ Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
List<TextRulerExample> examples = doc.getPositiveExamples();
boolean isFirstSlot = slotIndex == 0;
@@ -530,7 +530,7 @@ public class Wien extends TextRulerBasic
List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
CAS cas = doc.getCAS();
TypeSystem ts = cas.getTypeSystem();
- Type tokenType = ts.getType(TextRulerToolkit.TM_ALL_TYPE_NAME);
+ Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
List<TextRulerExample> examples = doc.getPositiveExamples();
for (TextRulerExample e : examples) {
TextRulerAnnotation slotAnnotation = e.getAnnotations()[slotIndex];
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/BatchRuleEvaluator.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/BatchRuleEvaluator.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/BatchRuleEvaluator.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/BatchRuleEvaluator.java Wed May 1 15:21:51 2013
@@ -60,7 +60,7 @@ public class BatchRuleEvaluator {
// set filters to NO filtering so that we can add it manually with
// the FILTERTYPE expression!
- IPath path = new Path(tempDir + "/results.tm");
+ IPath path = new Path(tempDir + "/results"+RutaEngine.SCRIPT_FILE_EXTENSION);
ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension()
.lastSegment());
ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { path
@@ -120,8 +120,8 @@ public class BatchRuleEvaluator {
// Input: 0/testing/withouttags/*.xmi
String inputFolder = foldRootDirectory + foldNumber + "/testing/withouttags/";
String rulesFile = foldRootDirectory + foldNumber + "/learnResults/" + slotName + "/"
- + algorithmID + "/results.tm";
- String scriptFile = tempDir + "results.tm";
+ + algorithmID + "/results"+RutaEngine.SCRIPT_FILE_EXTENSION;
+ String scriptFile = tempDir + "results"+RutaEngine.SCRIPT_FILE_EXTENSION;
File oldScriptFile = new File(scriptFile);
if (oldScriptFile.exists()) {
if (!oldScriptFile.delete()) {
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/SGMLToXMIConverter.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/SGMLToXMIConverter.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/SGMLToXMIConverter.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/SGMLToXMIConverter.java Wed May 1 15:21:51 2013
@@ -99,11 +99,4 @@ public class SGMLToXMIConverter {
}
- public static void main(String[] args) {
- String inputFolder = "/testinput/SA/all/txt";
- String outputFolder = "/testinput/SA/all/xmi/";
- String tmScriptFileForEngine = "/Users/tobi/Documents/runtime-EclipseApplication/MLSandBox/script/org.apache.uima.ml/types.tm";
-
- convertFilesInFolder(inputFolder, outputFolder, tmScriptFileForEngine);
- }
}
Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java?rev=1478049&r1=1478048&r2=1478049&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java Wed May 1 15:21:51 2013
@@ -15,7 +15,7 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
-*/
+ */
package org.apache.uima.ruta.textruler.ui;
@@ -29,6 +29,7 @@ import java.util.Map;
import org.apache.uima.UIMAFramework;
import org.apache.uima.resource.metadata.TypeDescription;
import org.apache.uima.resource.metadata.TypeSystemDescription;
+import org.apache.uima.ruta.engine.RutaEngine;
import org.apache.uima.ruta.textruler.TextRulerPlugin;
import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
import org.apache.uima.ruta.textruler.extension.TextRulerController;
@@ -69,7 +70,6 @@ import org.eclipse.ui.IMemento;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
-
public class TextRulerViewComposite extends org.eclipse.swt.widgets.Composite {
public class DefaultLabelProvider extends LabelProvider implements ITableLabelProvider {
@@ -298,8 +298,7 @@ public class TextRulerViewComposite exte
DirectoryDialog dlg = new DirectoryDialog(getShell());
dlg.setFilterPath(inputDirectoryText.getText());
dlg.setText("Additional Directory");
- dlg
- .setMessage("Select a directory with input additional XMI files for the learning algorithms.");
+ dlg.setMessage("Select a directory with input additional XMI files for the learning algorithms.");
String dir = dlg.open();
if (dir != null) {
additionalDirectoryText.setText(dir);
@@ -407,7 +406,7 @@ public class TextRulerViewComposite exte
public void widgetSelected(SelectionEvent event) {
FileDialog fd = new FileDialog(getShell(), SWT.OPEN);
fd.setText("Choose Ruta Source File");
- String[] filterExt = { "*.tm", "*.*" };
+ String[] filterExt = { "*" + RutaEngine.SCRIPT_FILE_EXTENSION, "*.*" };
fd.setFilterExtensions(filterExt);
String file = fd.open();
if (file != null) {