Examples of FSStringConstraint


Examples of org.apache.uima.cas.FSStringConstraint

      cas.getIndexRepository().addFS(token);

      String lemma = "the";
      // create filtered iterator over Tokens of type 1
      FSIterator<AnnotationFS> it = cas.getAnnotationIndex(tokenType).iterator();
      FSStringConstraint type1Constraint = cas.getConstraintFactory().createStringConstraint();
      type1Constraint.equals(lemma);
      FeaturePath path = cas.createFeaturePath();
      path.addFeature(lemmaFeat);
      FSMatchConstraint cons = cas.getConstraintFactory().embedConstraint(path, type1Constraint);
      it = cas.createFilteredIterator(it, cons);
View Full Code Here

Examples of org.apache.uima.cas.FSStringConstraint

      token.setStringValue(lemmaFeat, type1);
      cas.getIndexRepository().addFS(token);

      String lemma = "the";
      FSIterator<AnnotationFS> it = cas.getAnnotationIndex(tokenType).iterator();
      FSStringConstraint type1Constraint = cas.getConstraintFactory().createStringConstraint();
      type1Constraint.equals(lemma);
      ArrayList<String> path = new ArrayList<String>();
      path.add(lemmaFeat.getShortName());
      FSMatchConstraint cons = cas.getConstraintFactory().embedConstraint(path, type1Constraint);
      it = cas.createFilteredIterator(it, cons);
View Full Code Here

Examples of org.apache.uima.cas.FSStringConstraint

            ConstraintFactory cf = jcas.getConstraintFactory();

            FeaturePath feature_path = m_feat2path.get(feature_name);
            FSMatchConstraint feat_mc = null;
            for (int i = 0; i < values.length; ++i) {
                FSStringConstraint val_sc = cf.createStringConstraint();
                val_sc.equals(values[i].toString());
                if (null == feat_mc) {
                    feat_mc = cf.embedConstraint(feature_path, val_sc);
                }
                else {
                    feat_mc = cf.or(feat_mc, cf.embedConstraint(feature_path, val_sc));
View Full Code Here

Examples of org.apache.uima.cas.FSStringConstraint

      cas.getIndexRepository().addFS(token);

      String lemma = "the";
      // create filtered iterator over Tokens of type 1
      FSIterator it = cas.getAnnotationIndex(tokenType).iterator();
      FSStringConstraint type1Constraint = cas.getConstraintFactory().createStringConstraint();
      type1Constraint.equals(lemma);
      FeaturePath path = cas.createFeaturePath();
      path.addFeature(lemmaFeat);
      FSMatchConstraint cons = cas.getConstraintFactory().embedConstraint(path, type1Constraint);
      it = cas.createFilteredIterator(it, cons);
View Full Code Here

Examples of org.apache.uima.cas.FSStringConstraint

      token.setStringValue(lemmaFeat, type1);
      cas.getIndexRepository().addFS(token);

      String lemma = "the";
      FSIterator it = cas.getAnnotationIndex(tokenType).iterator();
      FSStringConstraint type1Constraint = cas.getConstraintFactory().createStringConstraint();
      type1Constraint.equals(lemma);
      ArrayList path = new ArrayList();
      path.add(lemmaFeat.getShortName());
      FSMatchConstraint cons = cas.getConstraintFactory().embedConstraint(path, type1Constraint);
      it = cas.createFilteredIterator(it, cons);
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.