2017-01-10 7 views
0

私はstanford CoreNLPツール、特にドイツ語のConstituency Parserを使用しています。 私はコマンドラインで作業しています。ドイツ語のstanford CoreNLPツール(Constituency Parser)は動作しません

[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) 

この問題の理由は何ですか:

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 

は、その後、私は以下を得た:

これは私が使用するコマンドはありますか? どうすれば解決できますか?

コマンドは英語で機能しました。

ありがとうございました!

答えて

0

スタンフォードCoreNLP 3.7.0の最新バージョンを取得していることを確認してください。このバグは修正されていると思いますので、もう一度ダウンロードしてください。最新のコードでサンプル文を実行すると、NullPointerの問題は発生しません。

+0

ありがとうございます!それは今働く。 –

関連する問題