Examples of subsumes()


Examples of aima.core.logic.fol.kb.data.Clause.subsumes()

    psi.addPositiveLiteral((Predicate) parser.parse("Q(C)"));
    // {~p(x,y)}
    Clause phi = new Clause();
    phi.addNegativeLiteral((Predicate) parser.parse("P(x,y)"));

    Assert.assertTrue(phi.subsumes(psi));
    // Non-Example
    // {~p(x,b),q(x)}
    psi = new Clause();
    psi.addNegativeLiteral((Predicate) parser.parse("P(x,B)"));
    psi.addPositiveLiteral((Predicate) parser.parse("Q(x)"));
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

    TypeSystem typeSystem = fromJcas.getTypeSystem();
    Type docType = typeSystem.getType(UIMAConstants.TYPE_DOCUMENT);
    CasCopier casCopier = new CasCopier(fromJcas.getCas(), modview.getCas());
    for (Annotation annotation : annotationIndex) {
      // TODO be careful here, because some people inherit from DocumentAnnotation
      if (typeSystem.subsumes(docType, annotation.getType())) {
        continue;
      }
      Annotation clone = (Annotation) casCopier.copyFs(annotation);
      // change the view/sofa of the new annotation...
      // see: http://osdir.com/ml/apache.uima.general/2007-09/msg00107.html
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

  private List<AnnotationFS> getAnnotations(AnnotationFS annotation, Type type,
          FeatureMatchExpression fme, RutaStream stream) {
    List<AnnotationFS> result = new ArrayList<AnnotationFS>();
    TypeSystem typeSystem = stream.getCas().getTypeSystem();
    if (typeSystem.subsumes(type, annotation.getType())) {
      result.add(annotation);
    } else {
      Collection<AnnotationFS> beginAnchors = stream.getBeginAnchor(annotation.getBegin())
              .getBeginAnchors(type);
      Collection<AnnotationFS> endAnchors = stream.getEndAnchor(annotation.getEnd()).getEndAnchors(type);
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

              fs = document.getCAS().createArrayFS(arraySize);
            } else {
              throw new CasEditorError("Unkown array type: " + type.getName() + "!");
            }
      }
      else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_ANNOTATION), type)) {

      // get begin of selection from editor, if any
      // TODO: Add an interface to retrieve the span from the editor

      int begin = 0;
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

              Type range = value.getFeature().getRange();

              FeatureStructure dragFeatureStructure = (FeatureStructure) event.data;

              if (typeSystem.subsumes(range, dragFeatureStructure.getType())) {

                FeatureStructure target = value.getFeatureStructure();

                target.setFeatureValue(value.getFeature(), dragFeatureStructure);
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

    for (Type eachType : allTypes) {
      if (!excludedTypes.contains(eachType.getName())) {
        List<Feature> features = eachType.getFeatures();
        for (Feature f : features) {
          Type range = f.getRange();
          if (typeSystem.subsumes(annotationType, range) || typeSystem.subsumes(stringType, range)) {
            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")
                    && !typeSystem.subsumes(basicType, eachType)) {
              types.add(eachType);
              break;
            }
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

    for (Type eachType : allTypes) {
      if (!excludedTypes.contains(eachType.getName())) {
        List<Feature> features = eachType.getFeatures();
        for (Feature f : features) {
          Type range = f.getRange();
          if (typeSystem.subsumes(annotationType, range) || typeSystem.subsumes(stringType, range)) {
            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")
                    && !typeSystem.subsumes(basicType, eachType)) {
              types.add(eachType);
              break;
            }
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

        List<Feature> features = eachType.getFeatures();
        for (Feature f : features) {
          Type range = f.getRange();
          if (typeSystem.subsumes(annotationType, range) || typeSystem.subsumes(stringType, range)) {
            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")
                    && !typeSystem.subsumes(basicType, eachType)) {
              types.add(eachType);
              break;
            }
          }
        }
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

        while (iterator.isValid()) { // hasNext()
          FeatureStructure fs = iterator.get();
          List<Feature> features = fs.getType().getFeatures();
          for (Feature feature : features) {
            Type range = feature.getRange();
            if (typeSystem.subsumes(annotationType, range)
                    || UIMAConstants.TYPE_STRING.equals(range.getName())) {
              result.add(fs);
              break;
            }
          }
View Full Code Here

Examples of org.apache.uima.cas.TypeSystem.subsumes()

    for (Feature eachFeature1 : features1) {

      Type range = eachFeature1.getRange();

      if (typeSystem.subsumes(annotationType, range)) {

        String name = eachFeature1.getShortName();

        Feature eachFeature2 = type2.getFeatureByBaseName(name);
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.