Package org.apache.uima.ruta.rule

Examples of org.apache.uima.ruta.rule.RuleElement


    JCas cas = stream.getJCas();
    DebugRuleElementMatch drem = new DebugRuleElementMatch(cas);

    DebugEvaluatedCondition base = new DebugEvaluatedCondition(cas);
    base.setValue(rem.isBaseConditionMatched());
    RuleElement ruleElement = rem.getRuleElement();
    String baseString = "";
    if (ruleElement instanceof RutaRuleElement) {
      baseString = verbalizer.verbalizeMatcher((RutaRuleElement) ruleElement);
    } else if (ruleElement instanceof ComposedRuleElement) {
      baseString = verbalizer.verbalizeComposed((ComposedRuleElement) ruleElement);
View Full Code Here


    }
    List<RuleElement> ruleElements = element.getContainer().getRuleElements();
    for (Integer each : indexes) {
      if (each > 0 && each <= ruleElements.size()) {
        Type type = getRandomType(stream);
        RuleElement ruleElement = ruleElements.get(each - 1);
        List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(ruleElement);
        for (AnnotationFS eachMatched : matchedAnnotationsOf) {
          AnnotationFS newAFS = stream.getCas().createAnnotation(type, eachMatched.getBegin(),
                  eachMatched.getEnd());
          stream.addAnnotation(newAFS, true, match);
View Full Code Here

          List<Number> reIndexes) {
    List<RuleElementMatch> result = new ArrayList<RuleElementMatch>();
    List<RuleElement> elements = element.getContainer().getRuleElements();
    for (Number eachNumber : reIndexes) {
      int eachInt = eachNumber.intValue();
      RuleElement ruleElement = elements.get(eachInt - 1);
      List<List<RuleElementMatch>> matchInfo = match.getMatchInfo(ruleElement);
      for (List<RuleElementMatch> list : matchInfo) {
        result.addAll(list);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.rule.RuleElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.