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/08/02 13:27:25 UTC

svn commit: r1368422 - in /uima/sandbox/trunk/TextMarker/uimaj-textmarker/src: main/java/org/apache/uima/textmarker/rule/ test/java/org/apache/uima/textmarker/

Author: pkluegl
Date: Thu Aug  2 11:27:24 2012
New Revision: 1368422

URL: http://svn.apache.org/viewvc?rev=1368422&view=rev
Log:
UIMA-2445
- consider only own types (not types of possible parent element) when looking for next annotations
- applied Rinat's patch

Modified:
    uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerDisjunctiveMatcher.java
    uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java
    uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/test/java/org/apache/uima/textmarker/AllTests.java

Modified: uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerDisjunctiveMatcher.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerDisjunctiveMatcher.java?rev=1368422&r1=1368421&r2=1368422&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerDisjunctiveMatcher.java (original)
+++ uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerDisjunctiveMatcher.java Thu Aug  2 11:27:24 2012
@@ -112,5 +112,9 @@ public class TextMarkerDisjunctiveMatche
     return expressions;
   }
 
+  public String toString() {
+    return matchers.toString();
+  }
+  
  
 }

Modified: uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java?rev=1368422&r1=1368421&r2=1368422&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java (original)
+++ uima/sandbox/trunk/TextMarker/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java Thu Aug  2 11:27:24 2012
@@ -95,8 +95,7 @@ public class TextMarkerTypeMatcher imple
     stream.moveToNext();
     if (stream.isValid()) {
       TextMarkerBasic nextBasic = (TextMarkerBasic) stream.get();
-      List<Type> reTypes = ruleElement.getMatcher().getTypes(parent, stream);
-
+      List<Type> reTypes = getTypes(parent, stream);
       Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(new AnnotationComparator());
       for (Type eachMatchType : reTypes) {
         List<Type> types = stream.getCas().getTypeSystem().getProperlySubsumedTypes(eachMatchType);
@@ -127,7 +126,7 @@ public class TextMarkerTypeMatcher imple
     stream.moveToPrevious();
     if (stream.isValid()) {
       TextMarkerBasic nextBasic = (TextMarkerBasic) stream.get();
-      List<Type> reTypes = ruleElement.getMatcher().getTypes(parent, stream);
+      List<Type> reTypes = getTypes(parent, stream);
       Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(new AnnotationComparator());
       for (Type eachMatchType : reTypes) {
         List<Type> types = stream.getCas().getTypeSystem().getProperlySubsumedTypes(eachMatchType);

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=1368422&r1=1368421&r2=1368422&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 11:27:24 2012
@@ -2,14 +2,16 @@ package org.apache.uima.textmarker;
 
 import org.apache.uima.textmarker.action.PartOfTest;
 import org.apache.uima.textmarker.condition.CurrentCountTest;
+import org.apache.uima.textmarker.condition.PositionTest;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
 @SuiteClasses({ DynamicAnchoringTest.class, DynamicAnchoringTest2.class, FilteringTest.class,
-    QuantifierTest1.class, QuantifierTest2.class, RuleInferenceTest.class,
-    RuleInferenceTest2.class, RuleInferenceTest3.class, LongGreedyTest.class, PartOfTest.class, CurrentCountTest.class })
+    LiteralStringMatchTest.class, LongGreedyTest.class, OutOfWindowTest.class, QuantifierTest1.class,
+    QuantifierTest2.class, RuleInferenceTest.class, RuleInferenceTest2.class,
+    RuleInferenceTest3.class, PartOfTest.class, CurrentCountTest.class, PositionTest.class })
 public class AllTests {
 
 }