Package edu.stanford.nlp.sempre

Examples of edu.stanford.nlp.sempre.FormulaGenerationInfo$RetrievedFormulasComparator


    }
    //generate from formula info
    Set<String> res = generateQuestions(fgInfo);
    //generate from equivalent formula if it exists
    if(fbFormulasInfo.hasOpposite(fgInfo.bInfo.formula)) {
      FormulaGenerationInfo eqInfo =
          new FormulaGenerationInfo(fbFormulasInfo.getBinaryInfo(fbFormulasInfo.equivalentFormula(fgInfo.bInfo.formula)),
              fgInfo.injectedInfo, fgInfo.entityInfo1, fgInfo.entityInfo2, fgInfo.uInfo, fgInfo.isCount, fgInfo.isInject, fgInfo.isUnary);
      res.addAll(generateQuestions(eqInfo));
    }
    return res;
  }
View Full Code Here


    }
  }

  private void extractFormulaFeatures(ParaphraseDerivation pDerivation) {
    if (!ParaphraseFeatureMatcher.containsDomain("Formula")) return;
    FormulaGenerationInfo fgInfo = pDerivation.fgInfo;
    pDerivation.featureVector.add("Formula", "binPopularity",Math.log(fgInfo.bInfo.popularity+1));
    pDerivation.featureVector.add("Formula", "entPopularity",Math.log(pDerivation.fgInfo.entityInfo1.popularity+1));
    pDerivation.featureVector.add("Formula", "binary="+fgInfo.bInfo.formula);
    if(fgInfo.isUnary) {
      pDerivation.featureVector.add("Formula", "uPopularity",Math.log(fgInfo.uInfo.popularity+1));
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.sempre.FormulaGenerationInfo$RetrievedFormulasComparator

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.