2016-09-01 35 views
1

不同,如果你運行: 的Java -mx3g -cp 「*」 edu.stanford.nlp.pipeline.StanfordCoreNLPServer -props StanfordCoreNLP-spanish.propertiesStanfordCoreNLP從StanfordCoreNLPServer

的Java -mx3g -cp 「*」 EDU。 stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-spanish.properties

第二個命令,打開終端,西班牙解析器工作正常,但是從服務器版本,它使用英語語法分析器,而不是西班牙語。

~/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數據 '厄爾尼諾總統胡里奧·桑切斯formo ungrupo德ministros一個quienes llamo洛杉磯辛科economistas magnificos。' 'localhost:9000 /?properties = {「tokenize.whitespace」:「true」,「annotators」:「parse」,「outputFormat」:「text」}'-O -

我需要運行StanfordCoreNLPServer西班牙模型文件,我需要一個特殊的參數嗎?

回答

1

那麼解決的辦法是在Running Stanford corenlp server with French models

,但我只是運行如下:

服務器的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 -

及其作品

0

在你可以使用下面的配置斯坦福corenlp - 滿 - 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 - 
相關問題