Package joshua.decoder.ff.tm.hiero

Examples of joshua.decoder.ff.tm.hiero.MemoryBasedBatchGrammar


 
 
  private void initializeGlueGrammar() throws IOException {
    logger.info("Constructing glue grammar...");
   
    MemoryBasedBatchGrammar gr = new MemoryBasedBatchGrammar(
        JoshuaConfiguration.glue_format,
        JoshuaConfiguration.glue_file,
        this.symbolTable,
        JoshuaConfiguration.glue_owner,
        JoshuaConfiguration.default_non_terminal,
        -1,
        JoshuaConfiguration.oovFeatureCost);
   
    this.grammarFactories.add(gr);
   
    if(JoshuaConfiguration.useRuleIDName){
      if(this.ruleStringToIDTable==null)
        this.ruleStringToIDTable = new HashMap<String,Integer>();
      gr.obtainRulesIDTable(this.ruleStringToIDTable, this.symbolTable);     
    }
   
  }
View Full Code Here


  private void initializeMainTranslationGrammar() throws IOException {
       
    if (logger.isLoggable(Level.INFO))
      logger.info("Using grammar read from file " + JoshuaConfiguration.tm_file);
   
    MemoryBasedBatchGrammar gr = new MemoryBasedBatchGrammar(
        JoshuaConfiguration.tm_format,
        JoshuaConfiguration.tm_file,
        this.symbolTable,
        JoshuaConfiguration.phrase_owner,
        JoshuaConfiguration.default_non_terminal,
        JoshuaConfiguration.span_limit,
        JoshuaConfiguration.oovFeatureCost);
    this.grammarFactories.add(gr);
   
    if(JoshuaConfiguration.useRuleIDName){
      if(this.ruleStringToIDTable==null)
        this.ruleStringToIDTable = new HashMap<String,Integer>();
      gr.obtainRulesIDTable(this.ruleStringToIDTable, this.symbolTable);     
    }
  }
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.hiero.MemoryBasedBatchGrammar

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.