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 2015/11/06 18:17:45 UTC

svn commit: r1712988 [5/5] - in /uima/ruta/branches/UIMA-4408: example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/ ruta-core-ext/src/main/java/or...

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java Fri Nov  6 17:17:42 2015
@@ -22,11 +22,11 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.expression.number.INumberExpression;
 import org.apache.uima.ruta.expression.number.SimpleNumberExpression;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
 import org.apache.uima.ruta.rule.RuleMatch;
@@ -62,9 +62,9 @@ public class MinMaxReluctant extends Abs
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
-    int minValue = min.getIntegerValue(parent, null, stream);
-    int maxValue = max.getIntegerValue(parent, null, stream);
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
+    int minValue = min.getIntegerValue(context, stream);
+    int maxValue = max.getIntegerValue(context, stream);
     if (matches.size() > 0) {
       RuleElementMatch ruleElementMatch = matches.get(matches.size() - 1);
       if (!ruleElementMatch.matched()) {
@@ -81,15 +81,15 @@ public class MinMaxReluctant extends Abs
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
     }
-    int minValue = min.getIntegerValue(ruleElement.getParent(), annotation, stream);
-    int maxValue = max.getIntegerValue(ruleElement.getParent(), annotation, stream);
+    RuleElement ruleElement = context.getElement();
+    int minValue = min.getIntegerValue(context, stream);
+    int maxValue = max.getIntegerValue(context, stream);
     List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);
     if (list == null) {
       if (maxValue > 0) {
@@ -115,7 +115,7 @@ public class MinMaxReluctant extends Abs
       return false;
     }
     ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();
-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);
+    RuleMatch extendedMatch = context.getRuleMatch().copy(extendedContainerMatch, after);
     
     List<RuleMatch> continueMatch = nextElement.continueMatch(after, annotation, extendedMatch,
             null, extendedContainerMatch, null, nextElement, stream, crowd);
@@ -126,8 +126,8 @@ public class MinMaxReluctant extends Abs
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
-    int minValue = min.getIntegerValue(parent, null, stream);
+  public boolean isOptional(MatchContext context, RutaStream stream) {
+    int minValue = min.getIntegerValue(context, stream);
     return minValue == 0;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java Fri Nov  6 17:17:42 2015
@@ -22,19 +22,18 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
-import org.apache.uima.ruta.rule.RuleMatch;
 import org.apache.uima.ruta.visitor.InferenceCrowd;
 
 public class NormalQuantifier extends AbstractRuleElementQuantifier {
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
     if (matches == null) {
       return null;
     }
@@ -54,19 +53,19 @@ public class NormalQuantifier extends Ab
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
     }
+    RuleElement ruleElement = context.getElement();
     List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);
     return list == null || list.isEmpty();
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return false;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java Fri Nov  6 17:17:42 2015
@@ -22,12 +22,11 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
-import org.apache.uima.ruta.rule.RuleMatch;
 import org.apache.uima.ruta.visitor.InferenceCrowd;
 
 public class PlusGreedy extends AbstractRuleElementQuantifier {
@@ -38,7 +37,7 @@ public class PlusGreedy extends Abstract
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
     boolean result = true;
     boolean allEmpty = true;
     if (matches == null) {
@@ -63,14 +62,14 @@ public class PlusGreedy extends Abstract
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
     }
-    List<List<RuleElementMatch>> matchInfo = extendedMatch.getMatchInfo(ruleElement);
+    RuleElement ruleElement = context.getElement();
+    List<List<RuleElementMatch>> matchInfo = context.getRuleMatch().getMatchInfo(ruleElement);
     List<RuleElementMatch> matches;
     if (after) {
       matches = matchInfo.get(matchInfo.size() - 1);
@@ -99,7 +98,7 @@ public class PlusGreedy extends Abstract
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return false;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java Fri Nov  6 17:17:42 2015
@@ -22,9 +22,9 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
 import org.apache.uima.ruta.rule.RuleMatch;
@@ -34,7 +34,7 @@ public class PlusReluctant extends Abstr
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
     boolean result = true;
     boolean allEmpty = true;
     for (RuleElementMatch match : matches) {
@@ -57,13 +57,13 @@ public class PlusReluctant extends Abstr
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
     }
+    RuleElement ruleElement = context.getElement();
     List<RuleElementMatch> ownList = containerMatch.getInnerMatches().get(ruleElement);
     if (ownList == null || ownList.isEmpty()) {
       return true;
@@ -74,7 +74,7 @@ public class PlusReluctant extends Abstr
       return false;
     }
     ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();
-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);
+    RuleMatch extendedMatch = context.getRuleMatch().copy(extendedContainerMatch, after);
     List<RuleMatch> continueMatch = nextElement.continueMatch(after, annotation, extendedMatch,
             null, extendedContainerMatch, null, nextElement, stream, crowd);
     boolean result = !nextElementMatched(nextElement, continueMatch);
@@ -82,7 +82,7 @@ public class PlusReluctant extends Abstr
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return false;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java Fri Nov  6 17:17:42 2015
@@ -23,19 +23,18 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
-import org.apache.uima.ruta.rule.RuleMatch;
 import org.apache.uima.ruta.visitor.InferenceCrowd;
 
 public class QuestionGreedy extends AbstractRuleElementQuantifier {
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
     boolean result = true;
     if (matches == null) {
       return Collections.emptyList();
@@ -56,19 +55,19 @@ public class QuestionGreedy extends Abst
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
     }
+    RuleElement ruleElement = context.getElement();
     List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);
     return list == null || list.isEmpty();
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return true;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java Fri Nov  6 17:17:42 2015
@@ -22,9 +22,9 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
 import org.apache.uima.ruta.rule.RuleMatch;
@@ -34,7 +34,7 @@ public class QuestionReluctant extends A
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
     boolean result = true;
     for (RuleElementMatch match : matches) {
       result &= match.matched() || match.getTextsMatched().isEmpty();
@@ -51,9 +51,9 @@ public class QuestionReluctant extends A
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
+    RuleElement ruleElement = context.getElement();
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
@@ -68,7 +68,7 @@ public class QuestionReluctant extends A
       return false;
     }
     ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();
-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);
+    RuleMatch extendedMatch = context.getRuleMatch().copy(extendedContainerMatch, after);
     
     List<RuleMatch> continueMatch = nextElement.continueMatch(after, annotation, extendedMatch,
             null, extendedContainerMatch, null, nextElement, stream, crowd);
@@ -77,7 +77,7 @@ public class QuestionReluctant extends A
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return true;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java Fri Nov  6 17:17:42 2015
@@ -22,23 +22,20 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
-import org.apache.uima.ruta.rule.RuleElement;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElementMatch;
-import org.apache.uima.ruta.rule.RuleMatch;
 import org.apache.uima.ruta.visitor.InferenceCrowd;
 
 public interface RuleElementQuantifier {
 
-  List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, RutaBlock parent,
+  List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, MatchContext context,
           RutaStream stream, InferenceCrowd crowd);
 
-  boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd);
+  boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd);
 
-  boolean isOptional(RutaBlock parent, RutaStream stream);
+  boolean isOptional(MatchContext context, RutaStream stream);
 
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java Fri Nov  6 17:17:42 2015
@@ -22,12 +22,10 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
-import org.apache.uima.ruta.rule.RuleElement;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElementMatch;
-import org.apache.uima.ruta.rule.RuleMatch;
 import org.apache.uima.ruta.visitor.InferenceCrowd;
 
 public class StarGreedy extends AbstractRuleElementQuantifier {
@@ -38,7 +36,7 @@ public class StarGreedy extends Abstract
 
   @Override
   public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,
-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {
+          MatchContext context, RutaStream stream, InferenceCrowd crowd) {
     boolean result = true;
     if (matches == null) {
       return null;
@@ -59,9 +57,8 @@ public class StarGreedy extends Abstract
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
     if(annotation == null) {
       // do not try to continue a match that totally failed
       return false;
@@ -70,7 +67,7 @@ public class StarGreedy extends Abstract
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return true;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java Fri Nov  6 17:17:42 2015
@@ -22,9 +22,9 @@ package org.apache.uima.ruta.rule.quanti
 import java.util.List;
 
 import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
 import org.apache.uima.ruta.RutaStream;
 import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
+import org.apache.uima.ruta.rule.MatchContext;
 import org.apache.uima.ruta.rule.RuleElement;
 import org.apache.uima.ruta.rule.RuleElementMatch;
 import org.apache.uima.ruta.rule.RuleMatch;
@@ -33,15 +33,15 @@ import org.apache.uima.ruta.visitor.Infe
 public class StarReluctant extends AbstractRuleElementQuantifier {
 
   @Override
-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, RutaBlock parent,
+  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, MatchContext context,
           RutaStream stream, InferenceCrowd crowd) {
     return matches;
   }
 
   @Override
-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,
-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,
-          InferenceCrowd crowd) {
+  public boolean continueMatch(boolean after, MatchContext context, AnnotationFS annotation,
+          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
+    RuleElement ruleElement = context.getElement();
     if (annotation == null) {
       // do not try to continue a match that totally failed
       return false;
@@ -51,7 +51,7 @@ public class StarReluctant extends Abstr
       return false;
     }
     ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();
-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);
+    RuleMatch extendedMatch = context.getRuleMatch().copy(extendedContainerMatch, after);
     List<RuleMatch> continueMatch = nextElement.continueMatch(after, annotation, extendedMatch,
             null, extendedContainerMatch, null, nextElement, stream, crowd);
     boolean result = !nextElementMatched(nextElement, continueMatch);
@@ -59,7 +59,7 @@ public class StarReluctant extends Abstr
   }
 
   @Override
-  public boolean isOptional(RutaBlock parent, RutaStream stream) {
+  public boolean isOptional(MatchContext context, RutaStream stream) {
     return true;
   }
 }

Modified: uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java
URL: http://svn.apache.org/viewvc/uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java?rev=1712988&r1=1712987&r2=1712988&view=diff
==============================================================================
--- uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java (original)
+++ uima/ruta/branches/UIMA-4408/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java Fri Nov  6 17:17:42 2015
@@ -287,8 +287,8 @@ public class ExpressionVerbalizer {
       SimpleFeatureExpression sfe = (SimpleFeatureExpression) expression;
       sb.append(sfe.getMatchReference().getMatch());
     } else {
-      sb.append(verbalize(expression.getTypeExpr(null)));
-      List<String> list = expression.getFeatureStringList(null);
+      sb.append(verbalize(expression.getTypeExpr(null, null)));
+      List<String> list = expression.getFeatureStringList(null, null);
       if (list != null) {
         for (String string : list) {
           sb.append(".");