Package org.apache.uima.ruta.type

Examples of org.apache.uima.ruta.type.RutaBasic.endsWith()


  @Override
  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,
          InferenceCrowd crowd) {
    RutaBasic endAnchor = stream.getEndAnchor(annotation.getEnd());
    Type t = type.getType(element.getParent());
    boolean result = endAnchor.beginsWith(t) && endAnchor.endsWith(t);
    return new EvaluatedCondition(this, result);
  }

}
View Full Code Here


    }
  }

  private boolean check(RutaStream stream, AnnotationFS matched, Type givenType) {
    RutaBasic endAnchor = stream.getEndAnchor(matched.getEnd());
    return endAnchor.endsWith(givenType);
  }

}
View Full Code Here

    boolean result = false;
    if (fs instanceof RutaBasic) {
      RutaBasic tmb = (RutaBasic) fs;
      if (types != null) {
        for (Type each : types) {
          result |= tmb.isPartOf(each)|| tmb.beginsWith(each) || tmb.endsWith(each);
          if (result)
            break;
        }
      }
    }
View Full Code Here

    }
  }

  private boolean check(RutaStream stream, AnnotationFS matched, Type givenType) {
    RutaBasic endAnchor = stream.getEndAnchor(matched.getEnd());
    return endAnchor.endsWith(givenType);
  }

}
View Full Code Here

  @Override
  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element,
          RutaStream stream, InferenceCrowd crowd) {
    RutaBasic endAnchor = stream.getEndAnchor(annotation.getEnd());
    Type t = type.getType(element.getParent());
    boolean result = endAnchor.beginsWith(t) && endAnchor.endsWith(t);
    return new EvaluatedCondition(this, result);
  }

}
View Full Code Here

    boolean result = false;
    if (fs instanceof RutaBasic) {
      RutaBasic tmb = (RutaBasic) fs;
      if (types != null) {
        for (Type each : types) {
          result |= tmb.isPartOf(each) || tmb.beginsWith(each) || tmb.endsWith(each);
          if (result)
            break;
        }
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.