После создания аннотированного CoreDocument необходимо сохранить его на диск, а затем извлечь его.
Вычисление аннотированного CoreDocument происходит медленно.После того, как он был создан, вы захотите использовать его позже, т.е. получите его с диска.
props.setProperty("annotators",
"tokenize,ssplit,pos,lemma,ner,parse,depparse,coref,kbp,quote");
// set a property for an annotator, in this case the coref annotator is being set to use the neural algorithm
props.setProperty("coref.algorithm", "neural");
// build pipeline
StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
// create a document object
CoreDocument document = new CoreDocument(content);
// annnotate the document
pipeline.annotate(document);