Open saidimu opened 9 years ago
Here's my config option:
var options = { 'nlpPath' : './corenlp', 'version' : '3.5.2', 'annotators': ['ssplit'] }; coreNLP = new NLP.StanfordNLP(options); coreNLP.loadPipelineSync();
It doesn't matter what I specify as the 'annotators' key, the following annotators are always loaded:
Adding annotator tokenize TokenizerAnnotator: No tokenizer type provided. Defaulting to PTBTokenizer. Adding annotator ssplit Adding annotator tokenize Adding annotator ssplit Adding annotator pos Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [3.6 sec]. Adding annotator lemma Adding annotator ner Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [11.5 sec]. Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [8.0 sec]. Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [6.1 sec]. Initializing JollyDayHoliday for SUTime from classpath: edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml as sutime.binder.1. Reading TokensRegex rules from edu/stanford/nlp/models/sutime/defs.sutime.txt Reading TokensRegex rules from edu/stanford/nlp/models/sutime/english.sutime.txt Reading TokensRegex rules from edu/stanford/nlp/models/sutime/english.holidays.sutime.txt Adding annotator parse Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ... done [1.9 sec]. Adding annotator dcoref Adding annotator depparse Loading depparse model file: edu/stanford/nlp/models/parser/nndep/english_UD.gz ... PreComputed 100000, Elapsed Time: 4.764 (s) Initializing dependency parser done [15.8 sec]. Adding annotator quote
loadPipelineSync has some bugs, I might fix them over the weekend, can you try using Async mode.
Confirmed that loadPipelineSync is the problem. Async mode works as expected.
loadPipelineSync
Thanks!
Here's my config option:
It doesn't matter what I specify as the 'annotators' key, the following annotators are always loaded: