Examples of LogSemiring


Examples of joshua.discriminative.semiring_parsingv2.semiring.LogSemiring

  @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
Copyright © 2018 www.massapi.com. 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.