this.binarizer = TreeBinarizer.simpleTreeBinarizer(parser.getTLPParams().headFinder(), parser.treebankLanguagePack());
}
private static ParserGrammar loadModel(String parserModel, String taggerModel) {
ParserGrammar model;
if (taggerModel == null) {
model = ParserGrammar.loadModel(parserModel);
} else {
model = ParserGrammar.loadModel(parserModel, "-preTag", "-taggerSerializedFile", taggerModel);
// preload tagger so the first query doesn't take forever
model.loadTagger();
}
model.setOptionFlags(model.defaultCoreNLPFlags());
return model;
}