Author: pkluegl
Date: Thu Aug  2 16:05:29 2012
New Revision: 1368568

URL: http://svn.apache.org/viewvc?rev=1368568&view=rev
Log:
UIMA-2451
- whitespaces are included in tree structure of word lists
- added parameter for MARKFAST whether whitespaces in dictionary entries should 
be ignored (default = true)
- added test
- updated documentation

Added:
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkFastTest.java
      - copied, changed from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/condition/PartOfTest.java
      - copied, changed from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.tm
      - copied, changed from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.tm
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.txt
      - copied, changed from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.txt
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTestList.txt
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.tm
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.txt
Removed:
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.tm
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.txt
Modified:
    
uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/tools.textmarker.actions.xml
    
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkFastAction.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/condition/InListCondition.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/AnonymousWordList.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/MultiTreeWordList.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextMarkerWordList.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextNode.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TreeWordList.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/verbalize/ActionVerbalizer.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/AllTests.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/DynamicAnchoringTest2.java
    
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java

Modified: 
uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/tools.textmarker.actions.xml
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/tools.textmarker.actions.xml?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/tools.textmarker.actions.xml
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/tools.textmarker.actions.xml
 Thu Aug  2 16:05:29 2012
@@ -622,7 +622,9 @@
                        optional. It defines if the MARKFAST action should 
ignore the case,
                        whereby its default value is false. The optional fourth 
parameter
                        specifies a character threshold for the ignorence of 
the case. It is
-                       only relevant if the ignore-case value is set to true. 
For more
+                       only relevant if the ignore-case value is set to true. 
The last
+                       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
                        <xref 
linkend='ugr.tools.tm.language.declarations.ressource' />
                        . Additionally to external word lists, string lists 
variables can be
@@ -634,9 +636,9 @@
                        </title>
                        <para>
                                
<programlisting><![CDATA[MARKFAST(TypeExpression,ListExpression(,BooleanExpression
-                                 (,NumberExpression)?)?)]]></programlisting>
+                                 
(,NumberExpression,(BooleanExpression)?)?)?)]]></programlisting>
                                
<programlisting><![CDATA[MARKFAST(TypeExpression,StringListExpression(,BooleanExpression
-          (,NumberExpression)?)?)]]></programlisting>
+          (,NumberExpression,(BooleanExpression)?)?)?)]]></programlisting>
                        </para>
                </section>
                <section>

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
 Thu Aug  2 16:05:29 2012
@@ -1402,8 +1402,8 @@ actionMarkFast returns [TextMarkerAction
     {action = ActionFactory.createAction(name, type, list, ignore, numExpr);}
     COMMA (list1 = wordListExpression | list2 = stringListExpression) {list = 
list1 == null ? list2 : list1;}
     {action = ActionFactory.createAction(name, type, list, ignore, numExpr);}
-    (COMMA ignore = booleanExpression (COMMA numExpr = numberExpression)?)? 
-    {action = ActionFactory.createAction(name, type, list, ignore, numExpr);} 
// TODO handle list
+    (COMMA ignore = booleanExpression (COMMA numExpr = numberExpression (COMMA 
ignoreWS = booleanExpression)?)?)? 
+    {action = ActionFactory.createAction(name, type, list, ignore, numExpr, 
ignoreWS);} // TODO handle list
     RPAREN
     ;
 

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g
 Thu Aug  2 16:05:29 2012
@@ -1303,11 +1303,11 @@ List<NumberExpression> list = new ArrayL
 actionMarkFast returns [AbstractTextMarkerAction action = null]
     :   
     MARKFAST LPAREN type = typeExpression COMMA (list1 = wordListExpression | 
list2 = stringListExpression) 
-    (COMMA ignore = booleanExpression (COMMA ignoreLength = 
numberExpression)?)? RPAREN
+    (COMMA ignore = booleanExpression (COMMA ignoreLength = numberExpression 
(COMMA ignoreWS = booleanExpression)?)?)? RPAREN
     {if(list1 != null) {
-     action = ActionFactory.createMarkFastAction(type, list1, ignore, 
ignoreLength, $blockDeclaration::env);
+     action = ActionFactory.createMarkFastAction(type, list1, ignore, 
ignoreLength, ignoreWS, $blockDeclaration::env);
     } else {
-     action = ActionFactory.createMarkFastAction(type, list2, ignore, 
ignoreLength, $blockDeclaration::env);
+     action = ActionFactory.createMarkFastAction(type, list2, ignore, 
ignoreLength, ignoreWS, $blockDeclaration::env);
     }
     }
     ;

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
 Thu Aug  2 16:05:29 2012
@@ -53,25 +53,21 @@ public class ActionFactory {
 
   public static AbstractTextMarkerAction createMarkFastAction(TypeExpression 
type,
           WordListExpression list, BooleanExpression ignore, NumberExpression 
ignoreLength,
-          TextMarkerBlock parent) {
-    return new MarkFastAction(type, list, ignore, ignoreLength);
+          BooleanExpression ignoreWS, TextMarkerBlock parent) {
+    return new MarkFastAction(type, list, ignore, ignoreLength, ignoreWS);
   }
 
-  
   public static AbstractTextMarkerAction createMarkFastAction(TypeExpression 
type,
           StringListExpression list, BooleanExpression ignore, 
NumberExpression ignoreLength,
-          TextMarkerBlock env) {
-    return new MarkFastAction(type, list, ignore, ignoreLength);
+          BooleanExpression ignoreWS, TextMarkerBlock env) {
+    return new MarkFastAction(type, list, ignore, ignoreLength, ignoreWS);
   }
-  
-  
+
   public static AbstractTextMarkerAction createMarkLastAction(TypeExpression 
type,
           TextMarkerBlock parent) {
     return new MarkLastAction(type);
   }
 
- 
-
   public static AbstractTextMarkerAction 
createRetainTypeAction(List<TypeExpression> types,
           TextMarkerBlock parent) {
     return new RetainTypeAction(types);
@@ -135,7 +131,6 @@ public class ActionFactory {
     return new FilterTypeAction(types);
   }
 
- 
   public static AbstractTextMarkerAction 
createSetFeatureAction(StringExpression f, Object v,
           TextMarkerBlock parent) {
     if (v instanceof NumberExpression) {
@@ -184,8 +179,11 @@ public class ActionFactory {
 
   public static AbstractTextMarkerAction createMarkTableAction(TypeExpression 
structure,
           NumberExpression index, WordTableExpression table,
-          Map<StringExpression, NumberExpression> map, BooleanExpression 
ignoreCase, NumberExpression ignoreLength, StringExpression ignoreChar, 
NumberExpression maxIgnoreChar, TextMarkerBlock env) {
-    return new MarkTableAction(structure, index, table, map, ignoreCase, 
ignoreLength, ignoreChar, maxIgnoreChar);
+          Map<StringExpression, NumberExpression> map, BooleanExpression 
ignoreCase,
+          NumberExpression ignoreLength, StringExpression ignoreChar,
+          NumberExpression maxIgnoreChar, TextMarkerBlock env) {
+    return new MarkTableAction(structure, index, table, map, ignoreCase, 
ignoreLength, ignoreChar,
+            maxIgnoreChar);
   }
 
   public static AbstractTextMarkerAction createMergeAction(BooleanExpression 
union, Token target,
@@ -241,6 +239,4 @@ public class ActionFactory {
     return new DynamicAnchoringAction(active, penalty, factor);
   }
 
-
-
 }

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkFastAction.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkFastAction.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkFastAction.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkFastAction.java
 Thu Aug  2 16:05:29 2012
@@ -48,22 +48,26 @@ public class MarkFastAction extends Abst
 
   private NumberExpression ignoreLength;
 
+  private BooleanExpression ignoreWS;
+
   public MarkFastAction(TypeExpression type, WordListExpression list, 
BooleanExpression ignore,
-          NumberExpression ignoreLength) {
+          NumberExpression ignoreLength, BooleanExpression ignoreWS) {
     super(type);
     this.list = list;
     this.ignore = ignore == null ? new SimpleBooleanExpression(false) : ignore;
     this.ignoreLength = ignoreLength == null ? new 
SimpleNumberExpression(Integer.valueOf(0))
             : ignoreLength;
+    this.ignoreWS = ignoreWS == null ? new SimpleBooleanExpression(true) : 
ignoreWS;
   }
 
   public MarkFastAction(TypeExpression type, StringListExpression list, 
BooleanExpression ignore,
-          NumberExpression ignoreLength) {
+          NumberExpression ignoreLength, BooleanExpression ignoreWS) {
     super(type);
     this.stringList = list;
     this.ignore = ignore == null ? new SimpleBooleanExpression(false) : ignore;
     this.ignoreLength = ignoreLength == null ? new 
SimpleNumberExpression(Integer.valueOf(0))
             : ignoreLength;
+    this.ignoreWS = ignoreWS == null ? new SimpleBooleanExpression(true) : 
ignoreWS;
   }
 
   @Override
@@ -74,14 +78,15 @@ public class MarkFastAction extends Abst
       TextMarkerStream windowStream = stream.getWindowStream(annotationFS, 
annotationFS.getType());
       TextMarkerWordList wl = null;
       if (list != null) {
-        list.getList(element.getParent());
+        wl = list.getList(element.getParent());
       } else if (stringList != null) {
         wl = new TreeWordList(stringList.getList(element.getParent()));
       }
       if (wl instanceof TreeWordList) {
         Collection<AnnotationFS> found = wl.find(windowStream,
                 ignore.getBooleanValue(element.getParent()),
-                ignoreLength.getIntegerValue(element.getParent()), null, 0);
+                ignoreLength.getIntegerValue(element.getParent()), null, 0,
+                ignoreWS.getBooleanValue(element.getParent()));
         for (AnnotationFS annotation : found) {
           TextMarkerBasic anchor = 
windowStream.getFirstBasicInWindow(annotation);
           createAnnotation(anchor, element, windowStream, annotation, match);
@@ -105,4 +110,9 @@ public class MarkFastAction extends Abst
   public NumberExpression getIgnoreLength() {
     return ignoreLength;
   }
+
+  public BooleanExpression getIgnoreWS() {
+    return ignoreWS;
+  }
+
 }

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MarkTableAction.java
 Thu Aug  2 16:05:29 2012
@@ -93,7 +93,7 @@ public class MarkTableAction extends Abs
     int maxIgnoreCharValue = maxIgnoreChar != null ? 
maxIgnoreChar.getIntegerValue(element.getParent()) : 0;
     
     TextMarkerWordList wordList = table.getWordList(index);
-    Collection<AnnotationFS> found = wordList.find(stream, ignoreCaseValue, 
ignoreLengthValue, ignoreCharValue.toCharArray(), maxIgnoreCharValue);
+    Collection<AnnotationFS> found = wordList.find(stream, ignoreCaseValue, 
ignoreLengthValue, ignoreCharValue.toCharArray(), maxIgnoreCharValue, true);
     for (AnnotationFS annotationFS : found) {
       List<String> rowWhere = table.getRowWhere(index - 1, 
annotationFS.getCoveredText());
       FeatureStructure newFS = stream.getCas().createFS(type);

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/condition/InListCondition.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/condition/InListCondition.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/condition/InListCondition.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/condition/InListCondition.java
 Thu Aug  2 16:05:29 2012
@@ -64,7 +64,7 @@ public class InListCondition extends Ter
     String coveredText = annotation.getCoveredText();
     if (stringList == null) {
       TextMarkerWordList wordList = listExpr.getList(element.getParent());
-      return new EvaluatedCondition(this, wordList.contains(coveredText, 
false, 0, null, 0));
+      return new EvaluatedCondition(this, wordList.contains(coveredText, 
false, 0, null, 0, true));
     }
     List<String> sList = stringList.getList(element.getParent());
     boolean contains = sList.contains(coveredText);

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/AnonymousWordList.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/AnonymousWordList.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/AnonymousWordList.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/AnonymousWordList.java
 Thu Aug  2 16:05:29 2012
@@ -38,17 +38,17 @@ public class AnonymousWordList implement
   }
 
   public boolean contains(String s, boolean ignoreCase, int size, char[] 
ignoreChars,
-          int maxIgnoreChars) {
+          int maxIgnoreChars, boolean ignoreWS) {
     return list.contains(s);
   }
 
   public boolean containsFragment(String s, boolean ignoreCase, int size, 
char[] ignoreChars,
-          int maxIgnoreChars) {
-    return contains(s, ignoreCase, size, ignoreChars, maxIgnoreChars);
+          int maxIgnoreChars, boolean ignoreWS) {
+    return contains(s, ignoreCase, size, ignoreChars, maxIgnoreChars, 
ignoreWS);
   }
 
   public List<AnnotationFS> find(TextMarkerStream stream, boolean ignoreCase, 
int size,
-          char[] ignoreToken, int maxIgnoredTokens) {
+          char[] ignoreToken, int maxIgnoredTokens, boolean ignoreWS) {
     List<AnnotationFS> result = new ArrayList<AnnotationFS>();
     for (String each : list) {
       stream.moveToFirst();

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/MultiTreeWordList.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/MultiTreeWordList.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/MultiTreeWordList.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/MultiTreeWordList.java
 Thu Aug  2 16:05:29 2012
@@ -371,7 +371,7 @@ public class MultiTreeWordList implement
    * @return True, if the TreeWordList contains the string s, false otherwise.
    */
   public boolean contains(String s, boolean ignoreCase) {
-    return contains(s, ignoreCase, 0, new char[] {}, 0);
+    return contains(s, ignoreCase, 0, new char[] {}, 0, true);
   }
 
   /**
@@ -390,7 +390,7 @@ public class MultiTreeWordList implement
    * @return true, if TreeWordList contains the string, false otherwise.
    */
   public boolean contains(String s, boolean ignoreCase, int size, char[] 
ignoreChars,
-          int maxIgnoreChars) {
+          int maxIgnoreChars, boolean ignoreWS) {
 
     EditDistanceCostMap edm = new EditDistanceCostMap();
 
@@ -417,7 +417,7 @@ public class MultiTreeWordList implement
    * @return true, if TreeWordList contains a prefix of the string, false 
otherwise.
    */
   public boolean containsFragment(String s, boolean ignoreCase, int size, 
char[] ignoreChars,
-          int maxIgnoreChars) {
+          int maxIgnoreChars, boolean ignoreWS) {
     MultiTextNode pointer = root;
     return recursiveContains(pointer, s, 0, ignoreCase && s.length() > size, 
true, ignoreChars,
             maxIgnoreChars);
@@ -638,7 +638,7 @@ public class MultiTreeWordList implement
   }
 
   public List<AnnotationFS> find(TextMarkerStream stream, boolean ignoreCase, 
int size,
-          char[] ignoreChars, int maxIgnoredChars) {
+          char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {
     assert false;
     return new ArrayList<AnnotationFS>();
   }

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextMarkerWordList.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextMarkerWordList.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextMarkerWordList.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextMarkerWordList.java
 Thu Aug  2 16:05:29 2012
@@ -29,10 +29,10 @@ import org.apache.uima.textmarker.TextMa
 public interface TextMarkerWordList {
 
   boolean contains(String string, boolean ignoreCase, int size, char[] 
ignoreChars,
-          int maxIgnoreChars);
+          int maxIgnoreChars, boolean ignoreWS);
 
   boolean containsFragment(String string, boolean ignoreCase, int size, char[] 
ignoreChars,
-          int maxIgnoreChars);
+          int maxIgnoreChars, boolean ignoreWS);
 
   Collection<String> contains(String string, boolean ignoreCase, int 
ignoreLength, boolean edit,
           double distance, String ignoreToken);
@@ -41,7 +41,7 @@ public interface TextMarkerWordList {
           boolean edit, double distance, String ignoreToken);
 
   Collection<AnnotationFS> find(TextMarkerStream stream, boolean ignoreCase, 
int size,
-          char[] ignoreToken, int maxIgnoredTokens);
+          char[] ignoreToken, int maxIgnoredTokens, boolean ingoreWS);
 
   Collection<AnnotationFS> find(TextMarkerStream stream, Map<String, Type> 
typeMap,
           boolean ignoreCase, int ignoreLength, boolean edit, double distance, 
String ignoreToken);

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextNode.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextNode.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextNode.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TextNode.java
 Thu Aug  2 16:05:29 2012
@@ -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.textmarker.resource;
 
@@ -76,4 +76,9 @@ public class TextNode {
   public Map<Character, TextNode> getChildren() {
     return this.children;
   }
+
+  public String toString() {
+    return value + (isWordEnd ? "+" : "");
+  }
+
 }

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TreeWordList.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TreeWordList.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TreeWordList.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/resource/TreeWordList.java
 Thu Aug  2 16:05:29 2012
@@ -39,6 +39,7 @@ import javax.xml.parsers.SAXParserFactor
 import org.apache.uima.cas.FSIterator;
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.collection.base_cpm.SkipCasException;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.textmarker.TextMarkerStream;
 import org.apache.uima.textmarker.type.TextMarkerBasic;
@@ -138,8 +139,6 @@ public class TreeWordList implements Tex
     // Create Nodes from all chars of the strings besides the last one
     TextNode pointer = root;
     for (Character each : s.toCharArray()) {
-      if (Character.isWhitespace(each))
-        continue;
       TextNode childNode = pointer.getChildNode(each);
       if (childNode == null) {
         childNode = new TextNode(each, false);
@@ -154,21 +153,21 @@ public class TreeWordList implements Tex
    * Checks if TreeWordList contains String s
    */
   public boolean contains(String s, boolean ignoreCase, int size, char[] 
ignoreChars,
-          int maxIgnoreChars) {
+          int maxIgnoreChars, boolean ignoreWS) {
     TextNode pointer = root;
     return recursiveContains(pointer, s, 0, ignoreCase && s.length() > size, 
false, ignoreChars,
-            maxIgnoreChars);
+            maxIgnoreChars, ignoreWS);
   }
 
   public boolean containsFragment(String s, boolean ignoreCase, int size, 
char[] ignoreChars,
-          int maxIgnoreChars) {
+          int maxIgnoreChars, boolean ignoreWS) {
     TextNode pointer = root;
     return recursiveContains(pointer, s, 0, ignoreCase && s.length() > size, 
true, ignoreChars,
-            maxIgnoreChars);
+            maxIgnoreChars, ignoreWS);
   }
 
   private boolean recursiveContains(TextNode pointer, String text, int index, 
boolean ignoreCase,
-          boolean fragment, char[] ignoreChars, int maxIgnoreChars) {
+          boolean fragment, char[] ignoreChars, int maxIgnoreChars, boolean 
ignoreWS) {
     if (pointer == null) {
       return false;
     }
@@ -191,29 +190,51 @@ public class TreeWordList implements Tex
     if (ignoreCase) {
       TextNode childNodeL = 
pointer.getChildNode(Character.toLowerCase(charAt));
       TextNode childNodeU = 
pointer.getChildNode(Character.toUpperCase(charAt));
+      if (childNodeL == null && ignoreWS) {
+        childNodeL = skipWS(pointer, charAt);
+      }
+      if (childNodeU == null && ignoreWS) {
+        childNodeU = skipWS(pointer, charAt);
+      }
       if (charAtIgnored && childNodeL == null && childNodeU == null) {
         return recursiveContains(pointer, text, next, ignoreCase, fragment, 
ignoreChars,
-                maxIgnoreChars);
+                maxIgnoreChars, ignoreWS);
       } else {
         return recursiveContains(childNodeL, text, next, ignoreCase, fragment, 
ignoreChars,
-                maxIgnoreChars)
+                maxIgnoreChars, ignoreWS)
                 | recursiveContains(childNodeU, text, next, ignoreCase, 
fragment, ignoreChars,
-                        maxIgnoreChars);
+                        maxIgnoreChars, ignoreWS);
       }
     } else {
       TextNode childNode = pointer.getChildNode(charAt);
+      if (childNode == null && ignoreWS) {
+        childNode = skipWS(pointer, charAt);
+      }
       if (charAtIgnored && childNode == null) {
         return recursiveContains(pointer, text, next, ignoreCase, fragment, 
ignoreChars,
-                maxIgnoreChars);
+                maxIgnoreChars, ignoreWS);
       } else {
         return recursiveContains(childNode, text, next, ignoreCase, fragment, 
ignoreChars,
-                maxIgnoreChars);
+                maxIgnoreChars, ignoreWS);
+      }
+    }
+  }
+
+  private TextNode skipWS(TextNode pointer, char charAt) {
+    TextNode childNode = pointer.getChildNode(' ');
+    if (childNode != null) {
+      TextNode node = childNode.getChildNode(charAt);
+      if (node == null) {
+        return skipWS(childNode, charAt);
+      } else {
+        return node;
       }
     }
+    return null;
   }
 
   public List<AnnotationFS> find(TextMarkerStream stream, boolean ignoreCase, 
int size,
-          char[] ignoreChars, int maxIgnoredChars) {
+          char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {
     ArrayList<AnnotationFS> results = new ArrayList<AnnotationFS>();
     stream.moveToFirst();
     FSIterator<AnnotationFS> streamPointer = stream.copy();
@@ -228,11 +249,13 @@ public class TreeWordList implements Tex
       // String lastCandidate = candidate.toString();
       Annotation interResult = null;
       while (streamPointer.isValid()) {
-        if (containsFragment(candidate.toString(), ignoreCase, size, 
ignoreChars, maxIgnoredChars)) {
+        if (containsFragment(candidate.toString(), ignoreCase, size, 
ignoreChars, maxIgnoredChars,
+                ignoreWS)) {
           streamPointer.moveToNext();
           if (streamPointer.isValid()) {
             TextMarkerBasic next = (TextMarkerBasic) streamPointer.get();
-            if (contains(candidate.toString(), ignoreCase, size, ignoreChars, 
maxIgnoredChars)) {
+            if (contains(candidate.toString(), ignoreCase, size, ignoreChars, 
maxIgnoredChars,
+                    ignoreWS)) {
               interResult = new Annotation(stream.getJCas(), 
basicsToAdd.get(0).getBegin(),
                       basicsToAdd.get(basicsToAdd.size() - 1).getEnd());
             }
@@ -241,12 +264,12 @@ public class TreeWordList implements Tex
             basicsToAdd.add(next);
           } else {
             tryToCreateAnnotation(stream, ignoreCase, size, results, 
basicsToAdd,
-                    candidate.toString(), interResult, ignoreChars, 
maxIgnoredChars);
+                    candidate.toString(), interResult, ignoreChars, 
maxIgnoredChars, ignoreWS);
           }
         } else {
           basicsToAdd.remove(basicsToAdd.size() - 1);
           tryToCreateAnnotation(stream, ignoreCase, size, results, basicsToAdd,
-                  candidate.toString(), interResult, ignoreChars, 
maxIgnoredChars);
+                  candidate.toString(), interResult, ignoreChars, 
maxIgnoredChars, ignoreWS);
           break;
         }
 
@@ -256,15 +279,16 @@ public class TreeWordList implements Tex
     return results;
   }
 
-  public List<AnnotationFS> find(TextMarkerStream stream, boolean ignoreCase, 
int size) {
-    return find(stream, ignoreCase, size, null, 0);
+  public List<AnnotationFS> find(TextMarkerStream stream, boolean ignoreCase, 
int size,
+          boolean ignoreWS) {
+    return find(stream, ignoreCase, size, null, 0, ignoreWS);
   }
 
   private void tryToCreateAnnotation(TextMarkerStream stream, boolean 
ignoreCase, int size,
           ArrayList<AnnotationFS> results, List<TextMarkerBasic> basicsToAdd, 
String lastCandidate,
-          Annotation interResult, char[] ignoreChars, int maxIgnoredChars) {
+          Annotation interResult, char[] ignoreChars, int maxIgnoredChars, 
boolean ignoreWS) {
     if (basicsToAdd.size() >= 1
-            && contains(lastCandidate, ignoreCase, size, ignoreChars, 
maxIgnoredChars)) {
+            && contains(lastCandidate, ignoreCase, size, ignoreChars, 
maxIgnoredChars, ignoreWS)) {
 
       results.add(new Annotation(stream.getJCas(), 
basicsToAdd.get(0).getBegin(), basicsToAdd.get(
               basicsToAdd.size() - 1).getEnd()));

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/verbalize/ActionVerbalizer.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/verbalize/ActionVerbalizer.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/verbalize/ActionVerbalizer.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/verbalize/ActionVerbalizer.java
 Thu Aug  2 16:05:29 2012
@@ -254,7 +254,8 @@ public class ActionVerbalizer {
       }
       return "MARKFAST(" + verbalizer.verbalize(a.getType()) + "," + list + ","
               + verbalizer.verbalize(a.getIgnore()) + ","
-              + verbalizer.verbalize(a.getIgnoreLength()) + ")";
+              + verbalizer.verbalize(a.getIgnoreLength()) + ","
+              + verbalizer.verbalize(a.getIgnoreWS()) + ")";
     } else if (action instanceof MarkLastAction) {
       MarkLastAction a = (MarkLastAction) action;
       return "MARKLAST(" + verbalizer.verbalize(a.getType()) + ")";

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/AllTests.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/AllTests.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/AllTests.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/AllTests.java
 Thu Aug  2 16:05:29 2012
@@ -1,7 +1,8 @@
 package org.apache.uima.textmarker;
 
-import org.apache.uima.textmarker.action.PartOfTest;
+import org.apache.uima.textmarker.action.MarkFastTest;
 import org.apache.uima.textmarker.condition.CurrentCountTest;
+import org.apache.uima.textmarker.condition.PartOfTest;
 import org.apache.uima.textmarker.condition.PositionTest;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
@@ -9,9 +10,10 @@ import org.junit.runners.Suite.SuiteClas
 
 @RunWith(Suite.class)
 @SuiteClasses({ DynamicAnchoringTest.class, DynamicAnchoringTest2.class, 
FilteringTest.class,
-    LiteralStringMatchTest.class, LongGreedyTest.class, OutOfWindowTest.class, 
QuantifierTest1.class,
-    QuantifierTest2.class, RuleInferenceTest.class, RuleInferenceTest2.class,
-    RuleInferenceTest3.class, PartOfTest.class, CurrentCountTest.class, 
PositionTest.class })
+    LiteralStringMatchTest.class, LongGreedyTest.class, OutOfWindowTest.class,
+    QuantifierTest1.class, QuantifierTest2.class, RuleInferenceTest.class,
+    RuleInferenceTest2.class, RuleInferenceTest3.class, MarkFastTest.class, 
CurrentCountTest.class,
+    PartOfTest.class, PositionTest.class })
 public class AllTests {
 
 }

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/DynamicAnchoringTest2.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/DynamicAnchoringTest2.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/DynamicAnchoringTest2.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/DynamicAnchoringTest2.java
 Thu Aug  2 16:05:29 2012
@@ -37,7 +37,7 @@ public class DynamicAnchoringTest2 {
     CAS cas = null;
     try {
       cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", 
namespace + "/" + name
-              + ".txt", 50, true,  null);
+              + ".txt", 50, true,  null, null);
     } catch (Exception e) {
       e.printStackTrace();
       assert (false);

Modified: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java?rev=1368568&r1=1368567&r2=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java
 Thu Aug  2 16:05:29 2012
@@ -53,17 +53,23 @@ public class TextMarkerTestUtils {
           throws URISyntaxException, IOException, InvalidXMLException,
           ResourceInitializationException, AnalysisEngineProcessException,
           ResourceConfigurationException {
-    return process(ruleFileName, textFileName, amount, false, null);
+    return process(ruleFileName, textFileName, amount, false, null, null);
   }
 
   public static CAS process(String ruleFileName, String textFileName, int 
amount,
-          boolean dynamicAnchoring, Map<String, String> complexTypes) throws 
URISyntaxException,
-          IOException, InvalidXMLException, ResourceInitializationException,
-          AnalysisEngineProcessException, ResourceConfigurationException {
-    URL resource = 
TextMarkerTestUtils.class.getClassLoader().getResource(ruleFileName);
-    File ruleFile = new File(resource.toURI());
-    resource = 
TextMarkerTestUtils.class.getClassLoader().getResource(textFileName);
-    File textFile = new File(resource.toURI());
+          boolean dynamicAnchoring, Map<String, String> complexTypes, String 
resourceDirName)
+          throws URISyntaxException, IOException, InvalidXMLException,
+          ResourceInitializationException, AnalysisEngineProcessException,
+          ResourceConfigurationException {
+    URL ruleURL = 
TextMarkerTestUtils.class.getClassLoader().getResource(ruleFileName);
+    File ruleFile = new File(ruleURL.toURI());
+    URL textURL = 
TextMarkerTestUtils.class.getClassLoader().getResource(textFileName);
+    File textFile = new File(textURL.toURI());
+    File resourceFile = null;
+    if (resourceDirName != null) {
+      URL resourceURL = 
TextMarkerTestUtils.class.getClassLoader().getResource(resourceDirName);
+      resourceFile = new File(resourceURL.toURI());
+    }
     URL url = 
TextMarkerEngine.class.getClassLoader().getResource("BasicEngine.xml");
     if (url == null) {
       url = TextMarkerTestUtils.class.getClassLoader().getResource(
@@ -99,6 +105,11 @@ public class TextMarkerTestUtils {
     }
     ae.setConfigParameterValue(TextMarkerEngine.MAIN_SCRIPT, name);
     ae.setConfigParameterValue(TextMarkerEngine.DYNAMIC_ANCHORING, 
dynamicAnchoring);
+    if (resourceFile != null) {
+      ae.setConfigParameterValue(TextMarkerEngine.RESOURCE_PATHS,
+              new String[] { resourceFile.getPath() });
+    }
+
     ae.reconfigure();
     CAS cas = ae.newCAS();
     cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));

Copied: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkFastTest.java
 (from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java)
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkFastTest.java?p2=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkFastTest.java&p1=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java&r1=1358125&r2=1368568&rev=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkFastTest.java
 Thu Aug  2 16:05:29 2012
@@ -32,21 +32,18 @@ import org.apache.uima.cas.text.Annotati
 import org.apache.uima.textmarker.TextMarkerTestUtils;
 import org.junit.Test;
 
-public class PartOfTest {
+public class MarkFastTest {
 
   @Test
   public void test() {
     String name = this.getClass().getSimpleName();
     String namespace = 
this.getClass().getPackage().getName().replaceAll("\\.", "/");
-    Map<String,String> complexTypes = new TreeMap<String, String>();
-    complexTypes.put("org.apache.uima.WithInitial", "uima.tcas.Annotation");
-    complexTypes.put("org.apache.uima.Initial", "uima.tcas.Annotation");
-    complexTypes.put("org.apache.uima.WithInitialEnd", 
"org.apache.uima.WithInitial");
+
     
     CAS cas = null;
     try {
       cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", 
namespace + "/" + name
-              + ".txt", 50, false, complexTypes);
+              + ".txt", 50, false, null, namespace + "/");
     } catch (Exception e) {
       e.printStackTrace();
       assert (false);
@@ -57,20 +54,30 @@ public class PartOfTest {
 
     t = TextMarkerTestUtils.getTestType(cas, 1);
     ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
+    assertEquals(3, ai.size());
     iterator = ai.iterator();
-    assertEquals("Vitamine", iterator.next().getCoveredText());
-    assertEquals("A", iterator.next().getCoveredText());
+    assertEquals("1 0 0", iterator.next().getCoveredText());
+    assertEquals("100", iterator.next().getCoveredText());
+    assertEquals("2 0 0", iterator.next().getCoveredText());
  
     t = TextMarkerTestUtils.getTestType(cas, 2);
     ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("A", iterator.next().getCoveredText());
+    assertEquals(0, ai.size());
  
     t = TextMarkerTestUtils.getTestType(cas, 3);
     ai = cas.getAnnotationIndex(t);
-    assertEquals(0, ai.size());
+    assertEquals(3, ai.size());
+    iterator = ai.iterator();
+    assertEquals("1 0 0", iterator.next().getCoveredText());
+    assertEquals("100", iterator.next().getCoveredText());
+    assertEquals("2 0 0", iterator.next().getCoveredText());
 
+    t = TextMarkerTestUtils.getTestType(cas, 4);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(2, ai.size());
+    iterator = ai.iterator();
+    assertEquals("1 0 0", iterator.next().getCoveredText());
+    assertEquals("2 0 0", iterator.next().getCoveredText());
+    
   }
 }

Copied: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/condition/PartOfTest.java
 (from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java)
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/condition/PartOfTest.java?p2=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/condition/PartOfTest.java&p1=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java&r1=1358125&r2=1368568&rev=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/PartOfTest.java
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/condition/PartOfTest.java
 Thu Aug  2 16:05:29 2012
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.uima.textmarker.action;
+package org.apache.uima.textmarker.condition;
 
 import static org.junit.Assert.assertEquals;
 
@@ -38,15 +38,15 @@ public class PartOfTest {
   public void test() {
     String name = this.getClass().getSimpleName();
     String namespace = 
this.getClass().getPackage().getName().replaceAll("\\.", "/");
-    Map<String,String> complexTypes = new TreeMap<String, String>();
+    Map<String, String> complexTypes = new TreeMap<String, String>();
     complexTypes.put("org.apache.uima.WithInitial", "uima.tcas.Annotation");
     complexTypes.put("org.apache.uima.Initial", "uima.tcas.Annotation");
     complexTypes.put("org.apache.uima.WithInitialEnd", 
"org.apache.uima.WithInitial");
-    
+
     CAS cas = null;
     try {
       cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", 
namespace + "/" + name
-              + ".txt", 50, false, complexTypes);
+              + ".txt", 50, false, complexTypes, null);
     } catch (Exception e) {
       e.printStackTrace();
       assert (false);
@@ -61,13 +61,13 @@ public class PartOfTest {
     iterator = ai.iterator();
     assertEquals("Vitamine", iterator.next().getCoveredText());
     assertEquals("A", iterator.next().getCoveredText());
- 
+
     t = TextMarkerTestUtils.getTestType(cas, 2);
     ai = cas.getAnnotationIndex(t);
     assertEquals(1, ai.size());
     iterator = ai.iterator();
     assertEquals("A", iterator.next().getCoveredText());
- 
+
     t = TextMarkerTestUtils.getTestType(cas, 3);
     ai = cas.getAnnotationIndex(t);
     assertEquals(0, ai.size());

Copied: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.tm
 (from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.tm)
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.tm?p2=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.tm&p1=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.tm&r1=1358125&r2=1368568&rev=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.tm
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.tm
 Thu Aug  2 16:05:29 2012
@@ -1,12 +1,15 @@
 PACKAGE org.apache.uima;
 
-DECLARE WithInitial, Initial;
-DECLARE WithInitial WithInitialEnd;
+WORDLIST list1 = 'MarkFastTestList.txt';
 
 DECLARE T1, T2, T3, T4, T5;
 
-CW{-> MARK(WithInitialEnd,1,2)} CW{-> MARK(Initial)} PERIOD;
+Document{->MARKFAST(T1, list1, false, 0, true)};
 
-ANY{PARTOF(WithInitialEnd) -> MARK(T1)};
-Initial {PARTOF(WithInitial) -> MARK(T2)};
-SW{PARTOF(WithInitialEnd) -> MARK(T3)};
\ No newline at end of file
+Document{->MARKFAST(T2, list1, false, 0, false)};
+
+Document{-> RETAINTYPE(SPACE)};
+
+Document{->MARKFAST(T3, list1, false, 0, true)};
+
+Document{->MARKFAST(T4, list1, false, 0, false)};
\ No newline at end of file

Copied: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.txt
 (from r1358125, 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.txt)
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.txt?p2=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.txt&p1=uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.txt&r1=1358125&r2=1368568&rev=1368568&view=diff
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/PartOfTest.txt
 (original)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTest.txt
 Thu Aug  2 16:05:29 2012
@@ -1 +1,6 @@
-I like Vitamine A.
\ No newline at end of file
+1 0 0
+aaaaa
+100 
+bbbbb
+2 0 0
+ccccc
\ No newline at end of file

Added: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTestList.txt
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTestList.txt?rev=1368568&view=auto
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTestList.txt
 (added)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkFastTestList.txt
 Thu Aug  2 16:05:29 2012
@@ -0,0 +1,2 @@
+1 0 0
+2 0 0

Added: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.tm
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.tm?rev=1368568&view=auto
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.tm
 (added)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.tm
 Thu Aug  2 16:05:29 2012
@@ -0,0 +1,12 @@
+PACKAGE org.apache.uima;
+
+DECLARE WithInitial, Initial;
+DECLARE WithInitial WithInitialEnd;
+
+DECLARE T1, T2, T3, T4, T5;
+
+CW{-> MARK(WithInitialEnd,1,2)} CW{-> MARK(Initial)} PERIOD;
+
+ANY{PARTOF(WithInitialEnd) -> MARK(T1)};
+Initial {PARTOF(WithInitial) -> MARK(T2)};
+SW{PARTOF(WithInitialEnd) -> MARK(T3)};
\ No newline at end of file

Added: 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.txt
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.txt?rev=1368568&view=auto
==============================================================================
--- 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.txt
 (added)
+++ 
uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/condition/PartOfTest.txt
 Thu Aug  2 16:05:29 2012
@@ -0,0 +1 @@
+I like Vitamine A.
\ No newline at end of file


Reply via email to