Package opennlp.ccg.synsem

Examples of opennlp.ccg.synsem.Category


      parser.parse(line);
      int numParses = Math.min(nbestListSize, parser.getResult().size());
      for (int i=0; i < numParses; i++) {
          Sign thisParse = parser.getResult().get(i);
          // convert lf
          Category cat = thisParse.getCategory();
          LF convertedLF = null;
          String predInfo = null;
          if (cat.getLF() != null) {
        // convert LF
        LF flatLF = cat.getLF();
        cat = cat.copy();
        Nominal index = cat.getIndexNominal();
        convertedLF = HyloHelper.compactAndConvertNominals(flatLF, index, thisParse);
        // get pred info
        predInfoMap.clear();
        Testbed.extractPredInfo(flatLF, predInfoMap);
        predInfo = Testbed.getPredInfo(predInfoMap);
View Full Code Here


      if (sign!=null && inputs!=null) {
       
        //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;
        }
View Full Code Here

  //Get value of subject feature from verb's result cat
  public String getSubjectFeature(Category cat){
 
    String retval=null;
    if (cat instanceof ComplexCat) {
      Category resCat = ((ComplexCat)cat).getResult();
      retval=this.getSubjectFeature(resCat);
    }
    else if (cat instanceof AtomCat) {
      AtomCat ac = (AtomCat) cat;
      FeatureStructure fs = ac.getFeatureStructure();
View Full Code Here

TOP

Related Classes of opennlp.ccg.synsem.Category

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.