1

if you run: java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -props StanfordCoreNLP-spanish.properties

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

The second command open a terminal and Spanish parser works fine, but from the Server version it use the English parser and not the Spanish.

~/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].

for the client I have use: 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 -

I need to run StanfordCoreNLPServer with the Spanish model file, do I need a special parameter?

2 Answers2

1

Well the solution is in Running Stanford corenlp server with French models

but I just run as follow:

The server java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer The client

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 -

and its works

Community
  • 1
  • 1
0

In stanford-corenlp-full-2016-10-31 version you can use the following configuration which seem to be more convenient (and ease :) )

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 -
darode
  • 140
  • 6