使用 WN-Affect 检测字符串的情绪/情绪 [英] Using WN-Affect to detect emotion/mood of a string

查看:28
本文介绍了使用 WN-Affect 检测字符串的情绪/情绪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了 WN-Affect.但是,我不确定如何使用它来检测句子的情绪.例如,如果我有一个字符串我讨厌足球".我希望能够检测出情绪是否不好,情绪是否是恐惧.WN-Affect 没有关于如何做的教程,我对 python 有点陌生.任何帮助都会很棒!

I downloaded WN-Affect. I am however not sure how to use it to detect the mood of a sentence. For example if I have a string "I hate football." I want to be able to detect whether the mood is bad and the emotion is fear. WN-Affect has no tutorial on how to do it, and I am kind of new to python. Any help would be great!

推荐答案

简而言之:改用 SentiWordNet 并查看 https://github.com/kevincobain2000/sentiment_classifier

In short: Use SentiWordNet instead and look at https://github.com/kevincobain2000/sentiment_classifier

长篇:

影响与情绪

情感和情感之间的界限非常好.人们应该在语言学研究中研究 Affectedness,例如http://compling.hss.ntu.edu.sg/events/2014-ws-affectedness/Sentiment Analysis 在计算研究中.现在,我们将识别情感和情绪的任务称为情绪分析.

The line between affect and sentiment is very fine. One should looking into Affectedness in linguistics studies, e.g. http://compling.hss.ntu.edu.sg/events/2014-ws-affectedness/ and Sentiment Analysis in computational researches. For now, let's call both the task of identifying affect and sentiment, sentiment analysis.

另请注意,与 SentiWordNet 相比,WN-Affect 是一个相当古老的资源,http://sentiwordnet.isti.cnr.it/.

Also note that WN-Affect is a rather old resource compared to SentiWordNet, http://sentiwordnet.isti.cnr.it/.

这里有一个使用 SentiWordNet 进行情感分析的好资源:https://github.com/kevincobain2000/sentiment_classifier.

通常情绪分析只有两类,positivenegative 情绪.而 WN-affect 使用 11 种类型的影响标签:

Often sentiment analysis has only two classes, positive or negative sentiment. Whereas the WN-affect uses 11 types of affectedness labels:

  • 情感
  • 心情
  • 特质
  • 认知状态
  • 身体状况
  • 享乐信号
  • 激发情感
  • 情绪反应
  • 行为
  • 态度
  • 感觉

每种类型有多个类,见https://github.com/larsmans/wordnet-domains-sentiwords/blob/master/wn-domains/wn-affect-1.1/a-hierarchy.xml

要回答如何使用 WN-Affect 的问题,您需要做几件事:

To answer the question of how one can use the WN-Affect, there're several things you need to do:

首先将WN1.6映射到WN3.0(这不是一件容易的事,需要做几次映射,尤其是2.0-2.1之间的映射)

First map WN1.6 to WN3.0 (it's not an easy task, you have to do several mappings, especially the mapping between 2.0-2.1)

现在使用WN-Affect with WN3.0,你可以申请

Now using the WN-Affect with WN3.0, you can apply

  • 与 SentiWordNet 情感分类器相同的分类技术或
  • 尝试最大化文本中的类,然后使用一些启发式方法来选择正面"/负面"

这篇关于使用 WN-Affect 检测字符串的情绪/情绪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆