Annotator parser = StanfordCoreNLP.getExistingAnnotator("parse");
if (parser == null) {
// TODO: these assertions rule out the possibility of alternately named parse/pos annotators
throw new AssertionError("Failed to get parser - this should not be possible");
}
if (parser.requires().contains(Annotator.POS_REQUIREMENT)) {
Annotator tagger = StanfordCoreNLP.getExistingAnnotator("pos");
if (tagger == null) {
throw new AssertionError("Parser required tagger, but failed to find the pos annotator");
}
List<Annotator> annotators = Generics.newArrayList();