【问题标题】:StanfordCoreNLP differs from StanfordCoreNLPServerStanfordCoreNLP 与 StanfordCoreNLPServer 不同
【发布时间】:2016-09-01 01:06:56
【问题描述】:

如果你运行: java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -props StanfordCoreNLP-spanish.properties

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-data 'El Presidente Julio Sanches formo ungrupo de ministros a quienes llamo los cincoeconomicas magnificos。 'localhost:9000/?properties={"tokenize.whitespace":"true","annotators":"parse","outputFormat":"text"}' -O -

我需要使用西班牙模型文件运行 StanfordCoreNLPServer,我需要特殊参数吗?

【问题讨论】:

    标签: stanford-nlp stanford-nlp-server


    【解决方案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": "text"}' -O -

    及其作品

    【讨论】:

      【解决方案2】:

      在 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 -
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多