Package opennlp.ccg.unify

Examples of opennlp.ccg.unify.FeatureStructure


       
        //Pass up unbalanced punctuation indicator
       
        //Result cat of current has unbal feature
        Category target = sign.getCategory().getTarget();
        FeatureStructure fs = target.getFeatureStructure();
        String punctFeatVal=null;
        if ( (fs != null && fs.hasAttribute("unbal"))) {
          Object val = fs.getValue("unbal");
          punctFeatVal = (val instanceof SimpleType) ? ((SimpleType)val).getName() : null;
        }
       
        //Right child (binary case) or only child (unary case) has unbalanced punct feature
        SignProps childProps=(SignProps)inputs[inputs.length-1].getData(SignProps.class);
View Full Code Here


      Category resCat = ((ComplexCat)cat).getResult();
      retval=this.getSubjectFeature(resCat);
    }
    else if (cat instanceof AtomCat) {
      AtomCat ac = (AtomCat) cat;
      FeatureStructure fs = ac.getFeatureStructure();
      for(String attr: fs.getAttributes()){
        if(attr.equals("sbj")){
          retval=fs.getValue(attr).toString();
          break;
        }
      }
    }
   
View Full Code Here

TOP

Related Classes of opennlp.ccg.unify.FeatureStructure

Copyright © 2018 www.massapicom. 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.