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 2012/12/20 11:53:59 UTC

svn commit: r1424402 - in /uima/sandbox/TextMarker/trunk/uimaj-textmarker/src: main/java/org/apache/uima/textmarker/action/ test/java/org/apache/uima/textmarker/ test/java/org/apache/uima/textmarker/action/ test/resources/org/apache/uima/textmarker/act...

Author: pkluegl
Date: Thu Dec 20 10:53:58 2012
New Revision: 1424402

URL: http://svn.apache.org/viewvc?rev=1424402&view=rev
Log:
UIMA-2507
- added tests for some actions
- fixed REMOVE and REMOVEDUPLICATE actions

Added:
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkScoreTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkTableTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MatchedTextTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MergeTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveDuplicateTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.tm
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.txt
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.tm
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.txt
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.tm
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.txt
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.tm
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.txt
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.tm
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.txt
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.tm
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.txt
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/table.csv
Modified:
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MergeAction.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveAction.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveDuplicateAction.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/SubAtomicTest.java
    uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java

Modified: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MergeAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MergeAction.java?rev=1424402&r1=1424401&r2=1424402&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MergeAction.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/MergeAction.java Thu Dec 20 10:53:58 2012
@@ -32,12 +32,14 @@ import org.apache.uima.textmarker.visito
 
 public class MergeAction extends AbstractTextMarkerAction {
 
+  @SuppressWarnings("rawtypes")
   private List<ListExpression> lists;
 
   private BooleanExpression unionExpr;
 
   private String target;
 
+  @SuppressWarnings("rawtypes")
   public MergeAction(BooleanExpression union, String target, List<ListExpression> list) {
     super();
     this.unionExpr = union;
@@ -45,7 +47,7 @@ public class MergeAction extends Abstrac
     this.lists = list;
   }
 
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings({ "unchecked", "rawtypes" })
   @Override
   public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
           InferenceCrowd crowd) {
@@ -58,11 +60,13 @@ public class MergeAction extends Abstrac
     } else {
       List<Object> lastList = null;
       for (int i = 1; i < lists.size(); i++) {
+        List l2 = lists
+                .get(i).getList(element.getParent());
         if (lastList != null) {
-          lastList = ListUtils.intersection(lastList, lists.get(i).getList(element.getParent()));
+          lastList = ListUtils.intersection(lastList, l2);
         } else {
-          lastList = ListUtils.intersection(lists.get(i - 1).getList(element.getParent()), lists
-                  .get(i).getList(element.getParent()));
+          List l1 = lists.get(i - 1).getList(element.getParent());
+          lastList = ListUtils.intersection(l1, l2);
         }
       }
       list = lastList;
@@ -76,6 +80,7 @@ public class MergeAction extends Abstrac
     return unionExpr;
   }
 
+  @SuppressWarnings("rawtypes")
   public List<ListExpression> getLists() {
     return lists;
   }

Modified: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveAction.java?rev=1424402&r1=1424401&r2=1424402&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveAction.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveAction.java Thu Dec 20 10:53:58 2012
@@ -19,11 +19,17 @@
 
 package org.apache.uima.textmarker.action;
 
+import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.uima.textmarker.TextMarkerStatement;
 import org.apache.uima.textmarker.TextMarkerStream;
 import org.apache.uima.textmarker.expression.TextMarkerExpression;
+import org.apache.uima.textmarker.expression.bool.BooleanExpression;
 import org.apache.uima.textmarker.expression.list.ListExpression;
+import org.apache.uima.textmarker.expression.number.NumberExpression;
+import org.apache.uima.textmarker.expression.string.StringExpression;
+import org.apache.uima.textmarker.expression.type.TypeExpression;
 import org.apache.uima.textmarker.rule.RuleElement;
 import org.apache.uima.textmarker.rule.RuleMatch;
 import org.apache.uima.textmarker.visitor.InferenceCrowd;
@@ -48,19 +54,51 @@ public class RemoveAction extends Abstra
     return elements;
   }
 
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings({ "rawtypes" })
   @Override
   public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
           InferenceCrowd crowd) {
-    List list = element.getParent().getEnvironment().getVariableValue(var, List.class);
-    for (TextMarkerExpression each : elements) {
-      if (each instanceof ListExpression) {
-        ListExpression l = (ListExpression) each;
-        list.removeAll(l.getList(element.getParent()));
-      } else {
-        list.remove(each);
+    TextMarkerStatement parent = element.getParent();
+    List list = parent.getEnvironment().getVariableValue(var, List.class);
+    List<Object> toRemove = new ArrayList<Object>();
+    for (Object entry : list) {
+      Object value1 = getValue(entry, parent);
+      for (TextMarkerExpression arg : elements) {
+        if(arg instanceof ListExpression) {
+          ListExpression l = (ListExpression) arg;
+          List list2 = l.getList(parent);
+          for (Object object : list2) {
+            Object value2 = getValue(object, parent);
+            if(value1.equals(value2)) {
+              toRemove.add(entry);
+            }
+          }
+        } else {
+          Object value2 = getValue(arg, parent);
+          if(value1.equals(value2)) {
+            toRemove.add(entry);
+          }
+        }
       }
     }
+    for (Object object : toRemove) {
+      list.remove(object);
+    }
+    parent.getEnvironment().setVariableValue(var, list);
   }
 
+  private Object getValue(Object obj, TextMarkerStatement parent) {
+    if(obj instanceof NumberExpression) {
+      return ((NumberExpression)obj).getDoubleValue(parent);
+    } else if(obj instanceof BooleanExpression) {
+      return ((BooleanExpression)obj).getBooleanValue(parent);
+    } else if(obj instanceof TypeExpression) {
+      return ((TypeExpression)obj).getType(parent);
+    } else if(obj instanceof StringExpression) {
+      return ((StringExpression)obj).getStringValue(parent);
+    }
+    return null;
+  }
+  
+  
 }

Modified: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveDuplicateAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveDuplicateAction.java?rev=1424402&r1=1424401&r2=1424402&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveDuplicateAction.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/action/RemoveDuplicateAction.java Thu Dec 20 10:53:58 2012
@@ -20,11 +20,16 @@
 package org.apache.uima.textmarker.action;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
+import org.apache.uima.textmarker.TextMarkerStatement;
 import org.apache.uima.textmarker.TextMarkerStream;
+import org.apache.uima.textmarker.expression.bool.BooleanExpression;
+import org.apache.uima.textmarker.expression.number.NumberExpression;
+import org.apache.uima.textmarker.expression.string.StringExpression;
+import org.apache.uima.textmarker.expression.type.TypeExpression;
 import org.apache.uima.textmarker.rule.RuleElement;
 import org.apache.uima.textmarker.rule.RuleMatch;
 import org.apache.uima.textmarker.visitor.InferenceCrowd;
@@ -42,13 +47,35 @@ public class RemoveDuplicateAction exten
     return var;
   }
 
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings({ "rawtypes" })
   @Override
   public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
           InferenceCrowd crowd) {
-    List list = element.getParent().getEnvironment().getVariableValue(var, List.class);
-    Set<Object> set = new HashSet<Object>(list);
-    element.getParent().getEnvironment().setVariableValue(var, new ArrayList<Object>(set));
+    List list = element.getParent().getEnvironment().getVariableValue(var, List.class);   
+    Collection<Object> values = new HashSet<Object>();
+    List<Object> result = new ArrayList<Object>();
+    for (Object each : list) {
+      Object obj = getValue(each,element.getParent());
+      if(!values.contains(obj)){
+        result.add(each);
+        values.add(obj);
+      }
+    }
+    
+    element.getParent().getEnvironment().setVariableValue(var, result);
 
   }
+
+  private Object getValue(Object obj, TextMarkerStatement parent) {
+    if(obj instanceof NumberExpression) {
+      return ((NumberExpression)obj).getDoubleValue(parent);
+    } else if(obj instanceof BooleanExpression) {
+      return ((BooleanExpression)obj).getBooleanValue(parent);
+    } else if(obj instanceof TypeExpression) {
+      return ((TypeExpression)obj).getType(parent);
+    } else if(obj instanceof StringExpression) {
+      return ((StringExpression)obj).getStringValue(parent);
+    }
+    return null;
+  }
 }

Modified: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/SubAtomicTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/SubAtomicTest.java?rev=1424402&r1=1424401&r2=1424402&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/SubAtomicTest.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/SubAtomicTest.java Thu Dec 20 10:53:58 2012
@@ -66,7 +66,7 @@ public class SubAtomicTest {
     
     try {
       cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
-              + ".txt", 50, false, false, complexTypes, null, cas);
+              + ".txt", 50, false, false, complexTypes, null, null, cas);
     } catch (Exception e) {
       e.printStackTrace();
       assert (false);

Modified: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java?rev=1424402&r1=1424401&r2=1424402&view=diff
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java (original)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/TextMarkerTestUtils.java Thu Dec 20 10:53:58 2012
@@ -25,6 +25,7 @@ import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -38,6 +39,7 @@ import org.apache.uima.cas.Type;
 import org.apache.uima.resource.ResourceConfigurationException;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.resource.ResourceSpecifier;
+import org.apache.uima.resource.metadata.TypeDescription;
 import org.apache.uima.resource.metadata.TypeSystemDescription;
 import org.apache.uima.textmarker.engine.TextMarkerEngine;
 import org.apache.uima.util.CasCreationUtils;
@@ -47,13 +49,28 @@ import org.apache.uima.util.XMLInputSour
 
 public class TextMarkerTestUtils {
 
+  public static class TestFeature {
+    public String name;
+
+    public String description;
+
+    public String range;
+
+    public TestFeature(String name, String description, String range) {
+      super();
+      this.name = name;
+      this.description = description;
+      this.range = range;
+    }
+  }
+
   private static final String TYPE = "org.apache.uima.T";
 
   public static CAS process(String ruleFileName, String textFileName, int amount)
           throws URISyntaxException, IOException, InvalidXMLException,
           ResourceInitializationException, AnalysisEngineProcessException,
           ResourceConfigurationException {
-    return process(ruleFileName, textFileName, amount, false, false, null, null, null);
+    return process(ruleFileName, textFileName, amount, false, false, null, null, null, null);
   }
 
   public static CAS process(String ruleFileName, String textFileName, int amount,
@@ -62,15 +79,25 @@ public class TextMarkerTestUtils {
           IOException, InvalidXMLException, ResourceInitializationException,
           AnalysisEngineProcessException, ResourceConfigurationException {
     return process(ruleFileName, textFileName, amount, dynamicAnchoring, simpleGreedyForComposed,
-            complexTypes, resourceDirName, null);
+            complexTypes, null, resourceDirName, null);
   }
 
   public static CAS process(String ruleFileName, String textFileName, int amount,
           boolean dynamicAnchoring, boolean simpleGreedyForComposed,
-          Map<String, String> complexTypes, String resourceDirName, CAS cas)
-          throws URISyntaxException, IOException, InvalidXMLException,
+          Map<String, String> complexTypes, Map<String, List<TestFeature>> features,
+          String resourceDirName) throws URISyntaxException, IOException, InvalidXMLException,
           ResourceInitializationException, AnalysisEngineProcessException,
           ResourceConfigurationException {
+    return process(ruleFileName, textFileName, amount, dynamicAnchoring, simpleGreedyForComposed,
+            complexTypes, features, resourceDirName, null);
+  }
+
+  public static CAS process(String ruleFileName, String textFileName, int amount,
+          boolean dynamicAnchoring, boolean simpleGreedyForComposed,
+          Map<String, String> complexTypes, Map<String, List<TestFeature>> features,
+          String resourceDirName, CAS cas) 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);
@@ -97,7 +124,15 @@ public class TextMarkerTestUtils {
     if (complexTypes != null) {
       Set<Entry<String, String>> entrySet = complexTypes.entrySet();
       for (Entry<String, String> entry : entrySet) {
-        basicTypeSystem.addType(entry.getKey(), "Type for Testing", entry.getValue());
+        String name = entry.getKey();
+        TypeDescription addType = basicTypeSystem.addType(name, "Type for Testing",
+                entry.getValue());
+        if (features != null) {
+          List<TestFeature> list = features.get(name);
+          for (TestFeature f : list) {
+            addType.addFeature(f.name, f.description, f.range);
+          }
+        }
       }
     }
 
@@ -122,12 +157,12 @@ public class TextMarkerTestUtils {
     }
 
     ae.reconfigure();
-    if(cas == null) {
+    if (cas == null) {
       cas = ae.newCAS();
       cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
     }
     ae.process(cas);
-    
+
     ae.destroy();
     return cas;
   }

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkScoreTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkScoreTest.java?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkScoreTest.java (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkScoreTest.java Thu Dec 20 10:53:58 2012
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class MarkScoreTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    FSIterator<AnnotationFS> iterator = null;
+
+    t = TextMarkerTestUtils.getTestType(cas, 3);
+    ai = cas.getAnnotationIndex(t);
+    iterator = ai.iterator();
+    assertEquals(2, ai.size());
+    assertEquals("Like a Headline:", iterator.next().getCoveredText());
+    assertEquals("Headline", iterator.next().getCoveredText());
+    
+    cas.release();
+  }
+}

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkTableTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkTableTest.java?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkTableTest.java (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MarkTableTest.java Thu Dec 20 10:53:58 2012
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.Feature;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.apache.uima.textmarker.TextMarkerTestUtils.TestFeature;
+import org.junit.Test;
+
+public class MarkTableTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+
+    Map<String, String> complexTypes = new TreeMap<String, String>();
+    String typeName = "org.apache.uima.Person";
+    complexTypes.put(typeName, "uima.tcas.Annotation");
+    
+    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();
+    List<TestFeature> list = new ArrayList<TextMarkerTestUtils.TestFeature>();
+    features.put(typeName, list);
+    String fn1 = "firstname";
+    list.add(new TestFeature(fn1, "", "uima.cas.String"));
+    String fn2 = "system";
+    list.add(new TestFeature(fn2, "", "uima.cas.String"));
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50, false, false, complexTypes, features, namespace + "/");
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    FSIterator<AnnotationFS> iterator = null;
+    AnnotationFS next = null;
+    String v1 = null;
+    String v2 = null;
+    t = cas.getTypeSystem().getType(typeName);
+    Feature f1 = t.getFeatureByBaseName(fn1);
+    Feature f2 = t.getFeatureByBaseName(fn2);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(3, ai.size());
+    iterator = ai.iterator();
+    next = iterator.next();
+    v1 = next.getStringValue(f1);
+    v2 = next.getStringValue(f2);
+    assertEquals("Peter", v1);
+    assertEquals("TextMarker", v2);
+    
+    next = iterator.next();
+    v1 = next.getStringValue(f1);
+    v2 = next.getStringValue(f2);
+    assertEquals("Marshall", v1);
+    assertEquals("UIMA", v2);
+    
+    next = iterator.next();
+    v1 = next.getStringValue(f1);
+    v2 = next.getStringValue(f2);
+    assertEquals("Joern", v1);
+    assertEquals("CAS Editor", v2);
+    
+    
+    cas.release();
+    
+  }
+}

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MatchedTextTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MatchedTextTest.java?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MatchedTextTest.java (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MatchedTextTest.java Thu Dec 20 10:53:58 2012
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class MatchedTextTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(1, ai.size());
+    
+    cas.release();
+    
+  }
+}

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MergeTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MergeTest.java?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MergeTest.java (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/MergeTest.java Thu Dec 20 10:53:58 2012
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class MergeTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(1, ai.size());
+    
+    t = TextMarkerTestUtils.getTestType(cas, 2);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(1, ai.size());
+    
+    cas.release();
+    
+  }
+}

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveDuplicateTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveDuplicateTest.java?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveDuplicateTest.java (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveDuplicateTest.java Thu Dec 20 10:53:58 2012
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class RemoveDuplicateTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(1, ai.size());
+    
+    cas.release();
+    
+  }
+}

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveTest.java?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveTest.java (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/action/RemoveTest.java Thu Dec 20 10:53:58 2012
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class RemoveTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    assertEquals(1, ai.size());
+    
+    cas.release();
+    
+  }
+}

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.tm?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.tm (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.tm Thu Dec 20 10:53:58 2012
@@ -0,0 +1,12 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+Document{-> RETAINTYPE(BREAK)};
+ANY+{-PARTOF(BREAK), -PARTOF(T1) -> MARK(T1)};
+
+T1{CONTAINS(W,1,2) -> MARKSCORE(10, T2)};
+T1{STARTSWITH(CW) -> MARKSCORE(10, T2)};
+T1{ENDSWITH(COLON) -> MARKSCORE(10, T2)};
+
+T2{SCORE(20,100) -> MARK(T3)};

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.txt?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.txt (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkScoreTest.txt Thu Dec 20 10:53:58 2012
@@ -0,0 +1,4 @@
+only some text
+Like a Headline:
+only some text
+Headline
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.tm?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.tm (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.tm Thu Dec 20 10:53:58 2012
@@ -0,0 +1,9 @@
+PACKAGE org.apache.uima;
+
+WORDTABLE table = 'table.csv';
+
+DECLARE T1, T2, T3, T4, T5;
+
+DECLARE Annotation Person (STRING firstname, STRING system);
+
+Document{-> MARKTABLE(Person, 1, table, true, 0, "", 0, "firstname" = 2, "system" = 3)};
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.txt?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.txt (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MarkTableTest.txt Thu Dec 20 10:53:58 2012
@@ -0,0 +1,3 @@
+Peter Kluegl: TextMarker
+Marshall Schor: UIMA
+Joern Kottmann: CAS Editor
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.tm?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.tm (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.tm Thu Dec 20 10:53:58 2012
@@ -0,0 +1,8 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+STRING string;
+
+Document{ -> MATCHEDTEXT(string)};
+Document{REGEXP(string)-> MARK(T1)};
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.txt?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.txt (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MatchedTextTest.txt Thu Dec 20 10:53:58 2012
@@ -0,0 +1,3 @@
+Peter Kluegl: TextMarker
+Marshall Schor: UIMA
+Joern Kottmann: CAS Editor
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.tm?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.tm (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.tm Thu Dec 20 10:53:58 2012
@@ -0,0 +1,17 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+TYPELIST list1 = {ANY, W, CW};
+TYPELIST list2 = {ANY, PM, PERIOD};
+TYPELIST list3 = {ANY, NUM};
+
+TYPELIST intersection;
+TYPELIST union;
+
+Document{ -> MERGE(true, union, list1, list2, list3)};
+Document{SIZE(union,8,8) -> MARK(T1)};
+
+Document{ -> MERGE(false, intersection, list1, list2, list3)};
+Document{SIZE(intersection,1,1) -> MARK(T2)};
+

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.txt?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.txt (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/MergeTest.txt Thu Dec 20 10:53:58 2012
@@ -0,0 +1 @@
+only some text
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.tm?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.tm (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.tm Thu Dec 20 10:53:58 2012
@@ -0,0 +1,10 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+TYPELIST typeList = {CW, CW, SW, SW, W};
+
+Document{ -> REMOVEDUPLICATE(typeList)};
+Document{SIZE(typeList,3,3) -> MARK(T1)};
+
+

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.txt?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.txt (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveDuplicateTest.txt Thu Dec 20 10:53:58 2012
@@ -0,0 +1 @@
+only some text
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.tm?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.tm (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.tm Thu Dec 20 10:53:58 2012
@@ -0,0 +1,10 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+TYPELIST typeList = {CW, CW, SW, SW, W};
+
+Document{ -> REMOVE(typeList, CW)};
+Document{SIZE(typeList,3,3) -> MARK(T1)};
+
+

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.txt?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.txt (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/RemoveTest.txt Thu Dec 20 10:53:58 2012
@@ -0,0 +1 @@
+only some text
\ No newline at end of file

Added: uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/table.csv
URL: http://svn.apache.org/viewvc/uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/table.csv?rev=1424402&view=auto
==============================================================================
--- uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/table.csv (added)
+++ uima/sandbox/TextMarker/trunk/uimaj-textmarker/src/test/resources/org/apache/uima/textmarker/action/table.csv Thu Dec 20 10:53:58 2012
@@ -0,0 +1,3 @@
+Kluegl;Peter;TextMarker
+Schor;Marshall;UIMA
+Kottmann;Joern;CAS Editor
\ No newline at end of file