Stanford nlp stanford CoreNLP工具(选区分析器),用于德语和#x27;行不通

Stanford nlp stanford CoreNLP工具(选区分析器),用于德语和#x27;行不通,stanford-nlp,Stanford Nlp,我正在使用斯坦福CoreNLP工具,特别是德语选区解析器。 我在命令行工作 这是我使用的命令: java -cp "*" -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-german.properties -annotators tokenize,ssplit,pos,parse -parse.model edu/stanford/nlp/models/srparser/germanSR.ser.gz

我正在使用斯坦福CoreNLP工具,特别是德语选区解析器。 我在命令行工作

这是我使用的命令:

java -cp "*" -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-german.properties -annotators tokenize,ssplit,pos,parse -parse.model edu/stanford/nlp/models/srparser/germanSR.ser.gz -file Test.txt -outputFormat xml
然后我得到了以下信息:

[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
[main] INFO edu.stanford.nlp.tagger.maxent.MaxentTagger - Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/german/german-hgc.tagger ... done [4.2 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator parse 
[main] INFO edu.stanford.nlp.parser.common.ParserGrammar - Loading parser from serialized file edu/stanford/nlp/models/srparser/germanSR.ser.gz ... done [4.8 sec].

Processing file /home/students/park/Desktop/SWP/s_COREnlp_370/stanford-corenlp-full-2016-10-31/Test.txt ... writing to /home/students/park/Desktop/SWP/s_COREnlp_370/stanford-corenlp-full-2016-10-31/Test.txt.xml
Exception in thread "main" java.lang.NullPointerException
    at edu.stanford.nlp.pipeline.ParserAnnotator.finishSentence(ParserAnnotator.java:309)
    at edu.stanford.nlp.pipeline.ParserAnnotator.doOneSentence(ParserAnnotator.java:267)
    at edu.stanford.nlp.pipeline.SentenceAnnotator.annotate(SentenceAnnotator.java:102)
    at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:75)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:605)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:615)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.processFiles(StanfordCoreNLP.java:1167)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.processFiles(StanfordCoreNLP.java:948)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.run(StanfordCoreNLP.java:1256)
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.main(StanfordCoreNLP.java:1326)
这个问题的原因是什么? 我怎样才能解决它

这个命令确实对英语有用


谢谢你的帮助

确保获得最新版本的斯坦福CoreNLP 3.7.0。我认为这个错误已经修复,所以你应该再次下载它。当我使用最新代码运行示例语句时,没有空指针问题