【问题标题】:Stanford coreNLP Sentiment analysis for Spanish斯坦福 coreNLP 西班牙语情绪分析
【发布时间】: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


    【解决方案1】:

    很遗憾,Stanford CoreNLP 不支持西班牙语的情绪分析。您将不得不在其他地方寻找西班牙语的情绪数据/预训练模型。

    (您看到的实际错误是 POS 标记器不在您的类路径中。确保您已下载单独的西班牙模型 JAR(可在 CoreNLP 站点上获得)并且它在您的类路径中。)

    【讨论】:

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