Package joshua.decoder.ff.tm

Examples of joshua.decoder.ff.tm.Grammar


  }
 
 
  private void reEstmateGrammars(){
    for (GrammarFactory grammarFactory : this.p_grammar_factories) {
      Grammar bathGrammar = grammarFactory.getGrammarForSentence(null);
      accumulatePosteriorCountInGrammar(bathGrammar);
      normalizePosteriorCountInGrammar(bathGrammar);
     
      //TODO: this will *correctly* write the regular grammar, instead of the GLUE grammar, but we should avoid this
      ((MonolingualGrammar) bathGrammar).writeGrammarOnDisk(outGrammarFile, this.symbolTable);
     
      bathGrammar.sortGrammar(this.p_l_feat_functions);
    }
  }
View Full Code Here


     
           
      // Sort the TM grammars (needed to do cube pruning)
      for (GrammarFactory grammarFactory : this.grammarFactories) {
        if (grammarFactory instanceof Grammar) {
          Grammar batchGrammar = (Grammar) grammarFactory;
          batchGrammar.sortGrammar(this.featureFunctions);
        }
      }
     
     
      this.decoderFactory = new DecoderFactory(
View Full Code Here

      */
     
     
      ConfusionDeriver confusionDeriver = new ConfusionDeriver(symbolTbl, featureWeights, 1.0);
     
      Grammar inputGrammar = new MemoryBasedBatchGrammar(
          "hiero",
          fInputGrammar,
          symbolTbl,
          "fake",
          "fake",
View Full Code Here

TOP

Related Classes of joshua.decoder.ff.tm.Grammar

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.