Package joshua.decoder.ff.lm

Examples of joshua.decoder.ff.lm.NgramExtractor


   
    this.startNgramOrder = startNgramOrder;
    this.endNgramOrder = endNgramOrder;
    this.symbolTbl = symbolTbl;
     
    this.ngramExtractor = new NgramExtractor(symbolTbl, ngramStateID, useIntegerNgram, baselineLMOrder);
    this.ngramModel  = loadModel(ngramModelFile);
   
    System.out.println("DiscriminativeNgramModel with size " + ngramModel.size());
   
  }
View Full Code Here


    if(baselineLMOrder<endNgramOrder)
      logger.severe("baselineLMOrder is too small; baselineLMOrder="+baselineLMOrder);
 
   
    this.symbolTbl = psymbol;
    this.ngramExtractor = new NgramExtractor(symbolTbl, ngramStateID, useIntegerNgram, baselineLMOrder);
    
    this.linearCorpusGainThetas = linearCorpusGainThetas;
    logger.info("linearCorpusGainThetas=" + this.linearCorpusGainThetas);

    //setup reference reader
View Full Code Here

  public BLEUOracleModel(int ngramStateID, int baselineLMOrder, int featID, SymbolTable psymbol, double weight, String[] referenceFiles, double[] linearCorpusGainThetas) {
 
    super(ngramStateID, weight, featID);
   
    this.symbolTbl = psymbol;
    this.ngramExtractor = new NgramExtractor(symbolTbl, ngramStateID, useIntegerNgram, baselineLMOrder);
   
   
    this.linearCorpusGainThetas = linearCorpusGainThetas;
    logger.info("linearCorpusGainThetas=" + this.linearCorpusGainThetas);
   
View Full Code Here

    }
    //this.symbolTbl = symbolTbl;
   

    this.linearCorpusGainThetas = linearCorpusGainThetas;
    this.ngramExtractor = new NgramExtractor(symbolTbl, ngramStateID, false, baselineLMOrder);
 
    //=== feature related
    this.featureStringToIntegerMap = featureStringToIntegerMap;
    this.restrictedFeatureSet = new HashSet<String>( featureStringToIntegerMap.keySet() );
    this.featTemplates = featTemplates;
View Full Code Here

    if(baselineLMOrder<endNgramOrder){
      System.out.println("baseline lm order is smaller than end_lm_order");
      System.exit(0);
    }
   
    this.ngramExtractor = new NgramExtractor(symbolTbl, ngramStateID, useIntegerNgram, baselineLMOrder);
   
    System.out.println("startOrder=" + startOrder);
    System.out.println("endOrder=" + endOrder);
   
  }
View Full Code Here

TOP

Related Classes of joshua.decoder.ff.lm.NgramExtractor

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.