Package joshua.decoder.hypergraph

Examples of joshua.decoder.hypergraph.TrivialInsideOutside.runInsideOutside()


  public HyperGraph decoding(HyperGraph hg, int sentenceID, BufferedWriter out) {   
 
    //=== step-1: run inside-outside
    //note, inside and outside will use the transition_cost of each hyperedge, this cost is already linearly interpolated
    TrivialInsideOutside pInsideOutside = new TrivialInsideOutside();
    pInsideOutside.runInsideOutside(hg, 0, 1, insideOutsideScalingFactor);//ADD_MODE=0=sum; LOG_SEMIRING=1;
   
    //=== initialize baseline table
    //TODO:????????????????????
    ((EdgeTblBasedBaselineFF)featFunctions.get(0)).collectTransitionLogPs(hg);
   
View Full Code Here


     
      //################setup the model: including estimation of variational model
      //### step-1: run inside-outside
      //note, inside and outside will use the transition_cost of each hyperedge, this cost is already linearly interpolated
      TrivialInsideOutside insideOutsider = new TrivialInsideOutside();
      insideOutsider.runInsideOutside(testHG, 0, 1, insideOutsideScalingFactor);//ADD_MODE=0=sum; LOG_SEMIRING=1;
     
      //### step-2: model extraction based on the definition of Q
      for(Map.Entry<VariationalNgramApproximator, FeatureTemplateBasedFF> entry : approximatorMap.entrySet()){
        VariationalNgramApproximator approximator = entry.getKey();
        FeatureTemplateBasedFF featureFunction = entry.getValue();
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.