Stemmer stemmer = argOptions.getObjectOption("stemmingAlgorithm", null);
String format = argOptions.getStringOption(
"dependencyParseFormat", "CoNLL");
if (format.equals("CoNLL")) {
DependencyExtractor e = (argOptions.hasOption('G'))
? new CoNLLDependencyExtractor(argOptions.getStringOption('G'),
filter, stemmer)
: new CoNLLDependencyExtractor(filter, stemmer);
DependencyExtractorManager.addExtractor("CoNLL", e, true);
} else if (format.equals("WaCKy")) {
if (argOptions.hasOption('G'))
throw new IllegalArgumentException(
"WaCKy does not support configuration with -G");
DependencyExtractor e =
new WaCKyDependencyExtractor(filter, stemmer);
DependencyExtractorManager.addExtractor("WaCKy", e, true);
} else
throw new IllegalArgumentException(
"Unrecognized dependency parsed format: " + format);