【发布时间】:2016-10-25 10:54:03
【问题描述】:
我正在尝试使用 Stanford CoreNLP 用西班牙语进行情绪分析。
是否也可以在西班牙语中使用情感注释器?
到目前为止,我更改了“spanish.properties”:
annotators = tokenize, ssplit, pos, parse, sentiment
tokenize.language = es
sentiment.model = edu/stanford/nlp/international/spanish
pos.model = edu/stanford/nlp/models/pos-tagger/spanish/spanish-distsim.tagger
ner.model = edu/stanford/nlp/models/ner/spanish.ancora.distsim.s512.crf.ser.gz
ner.applyNumericClassifiers = false
ner.useSUTime = false
parse.model = edu/stanford/nlp/models/lexparser/spanishPCFG.ser.gz
> initCoreNLP(type = "spanish")
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Searching for resource: StanfordCoreNLP-spanish.properties
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
Error in rJava::.jnew("edu.stanford.nlp.pipeline.StanfordCoreNLP", basename(path)) :
java.lang.RuntimeException: edu.stanford.nlp.io.RuntimeIOException: Error while loading a tagger model (probably missing model file)
我收到了这个错误,结果也不正确
> text <- c("Estoy feliz.", "Estoy triste." , "No me gusta eso." ,"Estoy enojado.")
> string.text <- annotateString(text)
> getSentiment(string.text)
id sentimentValue sentiment
1 1 2 Neutral
2 2 3 Positive
3 3 1 Negative
4 4 2 Neutral
您能帮我如何在斯坦福 coreNLP 中进行西班牙情绪分析吗?
【问题讨论】:
标签: stanford-nlp