Examples of FeatureExpression


Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

    // boolean base = matcher.match(annotation, stream, getParent());
    boolean base = true;
    if (matcher instanceof RutaTypeMatcher) {
      RutaTypeMatcher rtm = (RutaTypeMatcher) matcher;
      MatchReference mr = (MatchReference) rtm.getExpression();
      FeatureExpression featureExpression = mr.getFeatureExpression(parent, stream);
      if (featureExpression != null) {
        base = matcher.match(annotation, stream, getParent());
      }
    }
    List<AnnotationFS> textsMatched = new ArrayList<AnnotationFS>(1);
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

    // boolean base = matcher.match(annotation, stream, getParent());
    boolean base = true;
    if (matcher instanceof RutaTypeMatcher) {
      RutaTypeMatcher rtm = (RutaTypeMatcher) matcher;
      MatchReference mr = (MatchReference) rtm.getExpression();
      FeatureExpression featureExpression = mr.getFeatureExpression(parent, stream);
      if (featureExpression != null) {
        base = matcher.match(annotation, stream, getParent());
      }
    }
    List<AnnotationFS> textsMatched = new ArrayList<AnnotationFS>(1);
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

        annotations.add(stream.getDocumentAnnotation());
      } else {
        annotations.addAll(stream.getAnnotations(type));
      }
    }
    FeatureExpression featureExpression = mr.getFeatureExpression(parent, stream);
    if (featureExpression != null) {
      return featureExpression.getFeatureAnnotations(annotations, stream, parent, CHECK_ON_FEATURE);
    } else {
      return annotations;
    }
  }
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

              anchors.add(afs);
            }
          }
        }
      }
      FeatureExpression fm = mr.getFeatureExpression(parent, stream);
      if (fm != null) {
        return fm.getFeatureAnnotations(anchors, stream, parent, CHECK_ON_FEATURE);
      } else {
        return anchors;
      }
    }
    return Collections.emptyList();
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

              anchors.add(afs);
            }
          }
        }
      }
      FeatureExpression fm = mr.getFeatureExpression(parent, stream);
      if (fm != null) {
        return fm.getFeatureAnnotations(anchors, stream, parent, CHECK_ON_FEATURE);
      } else {
        return anchors;
      }
    }
    return Collections.emptyList();
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

  public boolean match(AnnotationFS annotation, RutaStream stream, RutaBlock parent) {
    if (annotation == null) {
      return false;
    }
    FeatureExpression featureExpression = mr.getFeatureExpression(parent, stream);
    if (featureExpression == null) {
      boolean b = checkType(annotation, stream, parent);
      if (b) {
        return true;
      }
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

    }
    return false;
  }

  private boolean checkFeature(AnnotationFS annotation, RutaStream stream, RutaBlock parent) {
    FeatureExpression fe = mr.getFeatureExpression(parent, stream);
    Feature feature = fe.getFeature(parent);
    if (fe instanceof FeatureMatchExpression) {
      FeatureMatchExpression fme = (FeatureMatchExpression) fe;
      boolean checkFeatureValue = fme.checkFeatureValue(annotation, stream, parent);
      if (checkFeatureValue) {
        return true;
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

          }
          stream.moveToNext();
        }
      }
    }
    FeatureExpression featureExpression = mr.getFeatureExpression(parent, stream);
    if (featureExpression != null) {
      return featureExpression.getFeatureAnnotations(annotations, stream, parent, CHECK_ON_FEATURE);
    } else {
      return annotations;
    }
  }
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

              }
            }
          }
        }
      }
      FeatureExpression fm = mr.getFeatureExpression(parent, stream);
      if (fm != null) {
        return fm.getFeatureAnnotations(anchors, stream, parent, CHECK_ON_FEATURE);
      } else {
        return anchors;
      }
    }
    return Collections.emptyList();
View Full Code Here

Examples of org.apache.uima.ruta.expression.feature.FeatureExpression

              }
            }
          }
        }
      }
      FeatureExpression fm = mr.getFeatureExpression(parent, stream);
      if (fm != null) {
        return fm.getFeatureAnnotations(anchors, stream, parent, CHECK_ON_FEATURE);
      } else {
        return anchors;
      }
    }
    return Collections.emptyList();
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.