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());
}