Examples of subsumes()


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

      for (Type eachType : types) {
        if(typeSystem.subsumes(eachType, type)) {
          List<Feature> features = each.getType().getFeatures();
          for (Feature feature : features) {
            Type range = feature.getRange();
            if (typeSystem.subsumes(annotationType, range)) {
              result.add(each);
              break;
            }
          }
        }
View Full Code Here

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

    boolean result = true;
    boolean allEmpty1 = true;
    boolean allEmpty2 = true;
    for (Feature eachFeature1 : features1) {
      Type range = eachFeature1.getRange();
      if (typeSystem.subsumes(annotationType, range)) {
        String name = eachFeature1.getShortName();
        Feature eachFeature2 = type2.getFeatureByBaseName(name);
        FeatureStructure featureValue1 = a1.getFeatureValue(eachFeature1);
        FeatureStructure featureValue2 = a2.getFeatureValue(eachFeature2);
        allEmpty1 &= featureValue1 == null;
View Full Code Here

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

        if (fs.getBegin() < posStart || fs.getEnd() > posEnd) {
          it.moveToNext();
          continue;
        }
        if (rootType != null) {
          if (!ts.subsumes(rootType, fs.getType())) {
            it.moveToNext();
            continue;
          }
        }
        if (filterSet == null || !filterSet.contains(fs.getType().getName())) {
View Full Code Here

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

      if (fs.getEnd() <= tmTokenAnnotation.getBegin())
        break; // if that happens we are out of reach and can stop
      if (fs.getBegin() <= tmTokenAnnotation.getBegin()
              && fs.getEnd() >= tmTokenAnnotation.getEnd()
              && !allFilters.contains(fs.getType().getName())
              && !ts.subsumes(tmRootType, fs.getType()))
        result.add(fs);
    }

    // search from the token annotation to the right
    if (rightIt.isValid())
View Full Code Here

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

      if (fs.getBegin() >= tmTokenAnnotation.getEnd())
        break; // if that happens we are out of reach and can stop
      if (fs.getBegin() <= tmTokenAnnotation.getBegin()
              && fs.getEnd() >= tmTokenAnnotation.getEnd()
              && !allFilters.contains(fs.getType().getName())
              && !ts.subsumes(tmRootType, fs.getType()))
        result.add(fs);
    }
    return result;
  }
View Full Code Here

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

      TypeSystem ts = cas.getTypeSystem();
      Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
      Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
      Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
      Type specialType = ts.getType(TextRulerToolkit.RUTA_SPECIAL_TYPE_NAME);
      isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
              || ts.subsumes(markupType, tokenAnnotation.getType())
              || ts.subsumes(numType, tokenAnnotation.getType())
              || ts.subsumes(specialType, tokenAnnotation.getType());
    }
  }
View Full Code Here

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

      Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
      Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
      Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
      Type specialType = ts.getType(TextRulerToolkit.RUTA_SPECIAL_TYPE_NAME);
      isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
              || ts.subsumes(markupType, tokenAnnotation.getType())
              || ts.subsumes(numType, tokenAnnotation.getType())
              || ts.subsumes(specialType, tokenAnnotation.getType());
    }
  }
View Full Code Here

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

      Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
      Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
      Type specialType = ts.getType(TextRulerToolkit.RUTA_SPECIAL_TYPE_NAME);
      isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
              || ts.subsumes(markupType, tokenAnnotation.getType())
              || ts.subsumes(numType, tokenAnnotation.getType())
              || ts.subsumes(specialType, tokenAnnotation.getType());
    }
  }

  protected TextRulerWordConstraint(TextRulerAnnotation tokenAnnotation, boolean isRegExpType) {
View Full Code Here

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

      Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
      Type specialType = ts.getType(TextRulerToolkit.RUTA_SPECIAL_TYPE_NAME);
      isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
              || ts.subsumes(markupType, tokenAnnotation.getType())
              || ts.subsumes(numType, tokenAnnotation.getType())
              || ts.subsumes(specialType, tokenAnnotation.getType());
    }
  }

  protected TextRulerWordConstraint(TextRulerAnnotation tokenAnnotation, boolean isRegExpType) {
    this.tokenAnnotation = tokenAnnotation;
View Full Code Here

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

      IExplainTreeNode debugNode = (IExplainTreeNode) element;
      TypeSystem ts = debugNode.getTypeSystem();

      Type ruleType = ts.getType(ExplainConstants.RULE_APPLY_TYPE);
      FeatureStructure fs = debugNode.getFeatureStructure();
      if (fs != null && ts.subsumes(ruleType, fs.getType())) {
        Feature f1 = ruleType.getFeatureByBaseName(ExplainConstants.APPLIED);
        int v1 = fs.getIntValue(f1);
        Feature f2 = ruleType.getFeatureByBaseName(ExplainConstants.TRIED);
        int v2 = fs.getIntValue(f2);
        Feature f3 = ruleType.getFeatureByBaseName(ExplainConstants.ELEMENT);
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.