1

実行する場合: java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -props StanfordCoreNLP-spanish.properties

java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-spanish.properties

2 番目のコマンドで端末を開くと、スペイン語のパーサーが正常に動作しますが、サーバー バージョンからは、スペイン語ではなく英語のパーサーが使用されます。

~/CoreNLP/stanford-corenlp-full-2015-12-09# java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer  -props StanfordCoreNLP-spanish.properties
-- listing properties --
pos.model=edu/stanford/nlp/models/pos-tagger/sp...
ner.model=edu/stanford/nlp/models/ner/spanish.a...
ner.useSUTime=false
parse.model=edu/stanford/nlp/models/lexparser/spa...
tokenize.language=es
annotators=tokenize, ssplit, pos, ner, parse
ner.applyNumericClassifiers=false
Starting server on port 9000 with timeout of 5000 milliseconds.
StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:9000
[/0:0:0:0:0:0:0:1:49579] API call w/annotators tokenize,ssplit,parse
El presidente Julio Sanches formo ungrupo de ministros a quienes llamo los cinco economistas magnificos.
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator parse
[pool-1-thread-1] INFO edu.stanford.nlp.parser.common.ParserGrammar - Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ...
done [0.4 sec].

私が使用しているクライアントの場合: wget --post-data 'El Presidente Julio Sanches formo ungrupo de ministros a quienes llamo los cinco economistas magnificos.' 'localhost:9000/?properties={"tokenize.whitespace":"true","annotators":"parse","outputFormat":"text"}' -O -

スペイン語モデル ファイルを使用して StanfordCoreNLPServer を実行する必要がありますが、特別なパラメーターは必要ですか?

4

2 に答える 2

1

解決策は、フランスのモデルでスタンフォードのcorenlpサーバーを実行するにあります

しかし、私は次のように実行します:

サーバー java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer クライアント

wget --post-data 'el perro corre detras del carro.' --header="Content-Type: text/plain; charset=UTF-8" 'localhost:9000/?properties={"annotators": "tokenize,ssplit,pos,parse", "parse.model":"edu /stanford/nlp/models/lexparser/spanishPCFG.ser.gz","pos.model":"edu/stanford/nlp/models/pos-tagger/spanish/spanish.tagger","tokenize.language":"fr ","outputFormat": "テキスト"}' -O -

とその作品

于 2016-09-06T17:05:27.650 に答える
0

stanford-corenlp-full-2016-10-31 バージョンでは、より便利なように見える次の構成を使用できます(そして簡単です:))

wget --post-data 'el perro corre detras del carro.' --header="Content-Type: text/plain; charset=UTF-8" 'localhost:9000/?properties={"annotators": "tokenize,ssplit,pos,parse", "pipelineLanguage": "es","outputFormat": "text"}' -O -
于 2017-03-19T18:33:43.097 に答える