Package joshua.prefix_tree

Examples of joshua.prefix_tree.ExtractRules


      compileJoshDir.setTargetCorpus(targetCorpusFileName);
      compileJoshDir.setAlignments(alignmentFileName);
      compileJoshDir.setOutputDir(joshDirName);
      compileJoshDir.execute();
     
      ExtractRules extractRules = new ExtractRules();
      extractRules.setJoshDir(joshDirName);
      extractRules.setTestFile(testFileName);
      extractRules.setOutputFile(rulesFileName);
      extractRules.execute();
     
    } catch (IOException e) {
      Assert.fail("Unable to write temporary file. " + e.toString());
    } catch (ClassNotFoundException e) {
      Assert.fail("Unable to extract rules. " + e.toString());
View Full Code Here


    compileJoshDir.setTargetCorpus(targetFileName);
    compileJoshDir.setAlignments(alignmentFileName);
    compileJoshDir.setOutputDir(joshDirName);
    compileJoshDir.execute();
   
    ExtractRules extractRules = new ExtractRules();
    extractRules.setSentenceInitialX(sentenceInitialX);
    extractRules.setSentenceFinalX(sentenceFinalX);
    extractRules.setEdgeXViolates(violatingX);
    extractRules.setMaxPhraseLength(5);
    extractRules.setMinNonterminalSpan(minNonterminalSpan);
    extractRules.setJoshDir(joshDirName);
    extractRules.setTestFile(testFileName);
    extractRules.setOutputFile(rulesFileName);
    try {
      extractRules.execute();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
      Assert.fail(e.getLocalizedMessage());
    }
   
View Full Code Here

TOP

Related Classes of joshua.prefix_tree.ExtractRules

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.