Closed AmazingDD closed 5 years ago
By a way,it get a perfect result in English model.
Hi, did you ever figure this out? I am also interested.
Apologies this comes in so late, but you can use a Chinese model by specifying the language in the properties, see https://stanfordnlp.github.io/CoreNLP/human-languages.html for more documentation. Here's a possible example:
CHINESE_PROPERTIES = {
"tokenize.language": "zh",
"segment.model": "edu/stanford/nlp/models/segmenter/chinese/ctb.gz",
"segment.sighanCorporaDict": "edu/stanford/nlp/models/segmenter/chinese",
"segment.serDictionary": "edu/stanford/nlp/models/segmenter/chinese/dict-chris6.ser.gz",
"segment.sighanPostProcessing": "true",
"ssplit.boundaryTokenRegex": "[.。]|[!?!?]+",
"pos.model": "edu/stanford/nlp/models/pos-tagger/chinese-distsim/chinese-distsim.tagger"
}
client = CoreNLPClient(default_properties=CHINESE_PROPERTIES)
Dear,sir I need some help to deal with how to use Chinese model. I just change client.py
star_cmd a="java -Xmx{memory}g -cp "{javanlp}/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -serverProperties StanfordCoreNLP-chinese.properties -port {port} -timeout {timeout}".
But I found it unwork when I run it on a Chinse word. It still use English Parser. I might need some help.