2016-08-02 10 views
0

私はダウンロードして、次のコマンドを使用してStandfor NLP 3.6.0 http://stanfordnlp.github.io/CoreNLP/index.html を実行しました:スタンフォードNLPサーバー::不明注釈:感情

java -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer --public --port 1062 

を私はPOS、トークナイザのような他のアノテーターをテストし、彼らは正常に動作。私は感情アノテーターを実行しようとするとただし、[http://nlp.stanford.edu/sentiment/]私は、次のエラーを取得:

java.lang.IllegalArgumentException: Unknown annotator: sentiment 
    at edu.stanford.nlp.pipeline.StanfordCoreNLP.ensurePrerequisiteAnnotators(StanfordCoreNLP.java:281) 
    at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.getProperties(StanfordCoreNLPServer.java:476) 
    at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.handle(StanfordCoreNLPServer.java:350) 
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) 
    at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83) 
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82) 
    at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675) 
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) 
    at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 

私は私が何をしないのですhttp://stanfordnlp.github.io/CoreNLP/index.html#download]わからない[私はダウンロードページから得たすべてのファイルをアップロード?

答えて

0

同じ問題が発生している方は、githubからプロジェクトをダウンロードしてください。ウェブサイトからはダウンロードしないでください。 models jar、English、ejmlモデルがあることを確認してください。

それはそれを行う必要があります。

0

sentimentアノテーターを実行しようとしているときでも3.6.0が動作しませんでした。しかし3.7.0は箱から出ました。ダウンロードはhereです。その後、java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000で実行し、http://stanfordnlp.github.io/CoreNLP/corenlp-server.htmlに記載されています。例えばカールで実行するcurl --data 'The quick brown fox jumped over the lazy dog.' 'http://localhost:9000/?properties={%22annotators%22%3A%22tokenize%2Cssplit%2Cparse%2Csentiment%22%2C%22outputFormat%22%3A%22json%22}'

関連する問題