Package joshua.corpus.vocab

Examples of joshua.corpus.vocab.SrilmSymbol


    String outVocabFile = args[1].trim();
    
   
    // Load the lm file so that the SRI toolkit will set up the map
    int lmOrder = 1;
    SymbolTable symbolTable = new SrilmSymbol(lmOrder);
    new LMGrammarSRILM((SrilmSymbol)symbolTable, lmOrder, lmFile);
   
   
    // Write the map to a temporary file
    File tmpFile = File.createTempFile("srilm", "out");
View Full Code Here


        this.symbolTable = existingSymbols;
      }
    } else if (JoshuaConfiguration.use_srilm) {
      logger.finest("Using SRILM symbol table");
      if (null == existingSymbols) {
        this.symbolTable = new SrilmSymbol(JoshuaConfiguration.lmOrder);
      } else {
        logger.finest("Populating SRILM symbol table with symbols from existing symbol table");
        this.symbolTable = new SrilmSymbol(existingSymbols, JoshuaConfiguration.lmOrder);
      }
    } else {
      if (null == existingSymbols) {
        //this.symbolTable = new Vocabulary();//new BuildinSymbol(null);
        this.symbolTable = new BuildinSymbol();
View Full Code Here

  public static void init_lm_grammar() throws IOException {
    if (use_srilm) {
      if (use_left_euqivalent_state || use_right_euqivalent_state) {
        throw new IllegalArgumentException("when using local srilm, we cannot use suffix stuff");
      }
      p_symbolTable = new SrilmSymbol(remote_symbol_tbl, g_lm_order);
      p_lm = new LMGrammarSRILM((SrilmSymbol)p_symbolTable, g_lm_order, lm_file);
     
    } else {
      //p_lm = new LMGrammar_JAVA(g_lm_order, lm_file, use_left_euqivalent_state);
      //big bug: should load the consistent symbol files
View Full Code Here

TOP

Related Classes of joshua.corpus.vocab.SrilmSymbol

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.