Package joshua.discriminative.semiring_parsingv2.applications

Examples of joshua.discriminative.semiring_parsingv2.applications.EntropyOnHGUsingIO


  @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.EntropyOnHGUsingIO

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.