Package joshua.corpus.vocab

Examples of joshua.corpus.vocab.BuildinSymbol


   
    //??????????????????????????????????????
    int baseline_lm_feat_id = 0;
    //??????????????????????????????????????
   
    SymbolTable p_symbolTable = new BuildinSymbol(null);
   
    KBestExtractor kbest_extractor = null;
    int topN = 300;//TODO
    boolean extract_unique_nbest = true;//TODO
    boolean do_ngram_clip_nbest = true; //TODO
View Full Code Here


   
//    ????????????????????????????????????????????????????
    int ngramStateID = 0;
    //??????????????????????????????????????
   
    SymbolTable symbolTbl = new BuildinSymbol(null);
   
    boolean useIntegerString = false;
    boolean useRuleIDName = false;
   
   
View Full Code Here

    String featureFile = null;
    if(args.length>9)
      featureFile = args[9].trim();   
   
   
    SymbolTable symbolTbl = new BuildinSymbol(null);     
    List<FeatureFunction> features =  new ArrayList<FeatureFunction>();
   
   
   
    //=== baseline feature ====
View Full Code Here

   
    boolean addBaselineFeature = true;//TODO
    String baselineFeatureName = "baseline_lzf";//TODO
   
   
    SymbolTable p_symbol = new BuildinSymbol(null);
   
//    ##setup feature templates list
    ArrayList<FeatureTemplate> featureTemplates =  new ArrayList<FeatureTemplate>();
   
    boolean useIntegerString = false;
View Full Code Here

   
    //????????????????????????????????????????????????????
    int ngramStateID = 0;
    //??????????????????????????????????????
   
    SymbolTable p_symbol = new BuildinSymbol(null);
   
    //##setup feature templates list
    ArrayList<FeatureTemplate> featTemplates =  new ArrayList<FeatureTemplate>();
   
    boolean useIntegerString = false;
View Full Code Here

 
// end readHyperGraph()
//===============================================================
  static public Map<String,Integer> obtainRuleStringToIDTable(String rulesFile) {
       
    SymbolTable symbolTable = new BuildinSymbol(null);
    GrammarReader<BilingualRule> ruleReader = new DiskHyperGraphFormatReader(rulesFile, symbolTable);
    Map<String,Integer> rulesIDTable = new HashMap<String,Integer>();
   
    ruleReader.initialize();
    for (Rule rule : ruleReader) {       
View Full Code Here

  static public int mergeDiskHyperGraphs(int ngramStateID, boolean saveModelCosts, int totalNumSent,
      boolean useUniqueNbest, boolean useTreeNbest,
      String filePrefix1, String filePrefix2, String filePrefixOut, boolean removeDuplicate) throws IOException{
   
    SymbolTable symbolTbl = new BuildinSymbol();
   
    DiskHyperGraph diskHG1 = new DiskHyperGraph(symbolTbl, ngramStateID, saveModelCosts, null);
    diskHG1.initRead(filePrefix1+".hg.items", filePrefix1+".hg.rules", null);
   
    DiskHyperGraph diskHG2 = new DiskHyperGraph(symbolTbl, ngramStateID, saveModelCosts, null);
View Full Code Here

 
 

  public void initializeDecoder(String configFile){
    VariationalDecoderConfiguration.readConfigFile(configFile);
    this.symbolTbl = new BuildinSymbol(null);
    this.featFunctions = new ArrayList<FeatureFunction>();
    this.ranker = new HGRanker(featFunctions);
    this.approximatorMap = new HashMap<VariationalNgramApproximator, FeatureTemplateBasedFF>();   
    VariationalDecoderConfiguration.initializeModels(configFile, this.symbolTbl, this.featFunctions, this.approximatorMap);   
    this.insideOutsideScalingFactor =  VariationalDecoderConfiguration.insideoutsideScalingFactor;
View Full Code Here

      System.out.println("num of args is "+ args.length);
      for(int i=0; i <args.length; i++)System.out.println("arg is: " + args[i]);
      System.exit(0);   
    }
    long start_time = System.currentTimeMillis();
    SymbolTable symbolTbl = new BuildinSymbol(null)
    boolean is_using_crf =  new Boolean(args[0].trim());
    HGDiscriminativeLearner.usingCRF=is_using_crf;
    String f_l_train_items=args[1].trim();
    String f_l_train_rules=args[2].trim();
    String f_l_orc_items=args[3].trim();
View Full Code Here

  }
 
 
  public static void main(String[] args) {
   
    SymbolTable symbolTable = new BuildinSymbol();
    //init symbol
   
    NULL_ALIGN_WRD_SYM_ID = symbolTable.addTerminal(NULL_ALIGN_WRD_SYM);
    NON_TERMINAL_TAG_SYM_ID = symbolTable.addNonterminal(NON_TERMINAL_TAG_SYM);
   
    //read weights files
    eweights_table = readWeightFile("C:\\data_disk\\java_work_space\\SyntaxMT\\phraseExtraction\\lex.f2e.gz");
    fweights_table = readWeightFile("C:\\data_disk\\java_work_space\\SyntaxMT\\phraseExtraction\\lex.e2f.gz");
   
View Full Code Here

TOP

Related Classes of joshua.corpus.vocab.BuildinSymbol

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.