Package joshua.discriminative.semiring_parsingv2.applications.min_risk_da

Examples of joshua.discriminative.semiring_parsingv2.applications.min_risk_da.RiskAndEntropyPM


  @Override
  protected ExpectationSemiringPM<LogSemiring, ScalarPM, ScalarPM, ScalarPM,ScalarBO>
  getEdgeXWeight(HyperEdge dt, HGNode parent_item) {
    //== p
    double logProb = scale * dt.getTransitionLogP(false);
    LogSemiring p = new LogSemiring(logProb);
   
    //== r
    double val = 0;//real
    if(dt.getRule()!=null){
      val = dt.getRule().getEnglish().length-dt.getRule().getArity();//length; real semiring
View Full Code Here


  @Override
  protected ExpectationSemiring<LogSemiring, ScalarPM>
  getEdgeKWeight(HyperEdge dt, HGNode parent_item) {
    //== p
    double logProb = scale * dt.getTransitionLogP(false);
    LogSemiring p = new LogSemiring(logProb);
   
    //== r
    double val = 0;//real
    if(dt.getRule()!=null){
      val = dt.getRule().getEnglish().length-dt.getRule().getArity();//length; real semiring
View Full Code Here

TOP

Related Classes of joshua.discriminative.semiring_parsingv2.applications.min_risk_da.RiskAndEntropyPM

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.