Examples of runInsideOutside()


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

    //HyperGraph  hg_original_1best = hg_full.get_1best_tree_hg();//debug #### find 1-best based on original model (no corrective)
   
    //####feature extraction using the current model, get g_tbl_feats_model
    if(usingCRF){
      DefaultInsideOutside insideOutsider = new FeatureBasedInsideOutside(optimizer.getSumModel(), featTemplates, restrictedFeatureSet);//do inference using current model
      insideOutsider.runInsideOutside(fullHG, 0, 1,1);
      //inside_outside.sanity_check_hg(hg_full);
      FeatureExtractionHG.featureExtractionOnHG(fullHG, insideOutsider, modelFeatsTbl, restrictedFeatureSet, featTemplates)
      insideOutsider.clearState();
      //sent_rerank_1best_debug = RescorerHG.rerank_hg_and_get_1best_string(hg_full, p_optimizer.get_sum_model(), g_baseline_scale, g_restricted_feature_set, l_feat_templates_nobaseline, false);
    }else{//perceptron 
View Full Code Here

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

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

     
      //################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

Examples of joshua.discriminative.feature_related.FeatureBasedInsideOutside.runInsideOutside()

    //HyperGraph  hg_original_1best = hg_full.get_1best_tree_hg();//debug #### find 1-best based on original model (no corrective)
   
    //####feature extraction using the current model, get g_tbl_feats_model
    if(usingCRF){
      DefaultInsideOutside insideOutsider = new FeatureBasedInsideOutside(optimizer.getSumModel(), featTemplates, restrictedFeatureSet);//do inference using current model
      insideOutsider.runInsideOutside(fullHG, 0, 1,1);
      //inside_outside.sanity_check_hg(hg_full);
      FeatureExtractionHG.featureExtractionOnHG(fullHG, insideOutsider, modelFeatsTbl, restrictedFeatureSet, featTemplates)
      insideOutsider.clearState();
      //sent_rerank_1best_debug = RescorerHG.rerank_hg_and_get_1best_string(hg_full, p_optimizer.get_sum_model(), g_baseline_scale, g_restricted_feature_set, l_feat_templates_nobaseline, false);
    }else{//perceptron 
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.