博客情感分析的nltk NaiveBayesClassifier培训 [英] nltk NaiveBayesClassifier training for blogs sentiment analysis

查看:184
本文介绍了博客情感分析的nltk NaiveBayesClassifier培训的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从不同的博客文章中删除了有关特定主题的文本.我阅读的有关sendimenet分析的大多数主题都是基于训练分类器,以便确定它是否为正/负答案,如此

I scrapped texts from different blog posts about a specific topic. Most of topics I read about sentimenet analysis are based on training the classifier, in order to decide whether it is a pos/neg answer as shown in this thread. My questions is where can I find dictionary of words, and there sentiments. eg: Nice: Positive , bad: negative.

推荐答案

您正在寻找的是情感词典.情感词典是一个单词词典,其中每个单词都有一个相应的情感得分(范围从非常负面到非常积极),或者如您提到的那样,诸如好或坏之类的标签(但后一种情况并不常见).您可以使用多种情感词典,例如sentiwordnet,senistrength和AFINN等.在所有这三个词典中,您都会获得与每个情感词相对应的情感分数,当然,您可以简单地设置一个条件,即如果一个单词具有相应的否定分数,则其不好,而如果其得分为正数,则其得分为好. 其中最容易使用的是AFINN,我建议您先使用AFINN.稍后,您可以根据您的应用程序升级到更合适的应用程序. 您可以在此处找到有关信息,并从

What you are looking for is a sentiment lexicon. A sentiment lexicon is a dictionary of words, in which each word has a corresponding sentiment score (ranging from very negative to very positive) or as you mentioned a tag such as good or bad (But the later is uncommon). There are several sentiment lexicons that you could use, such as sentiwordnet, sentistrength, and AFINN just to name a few. In all three of these lexicons you get sentiment scores corresponding to each sentiment word, and ofcourse, you can simply set a condition that if a word has a corresponding negative score its bad and if a positive one its good. The easiest to use among these is AFINN which I recommend you to start with. Later you can upgrade to a more suitable one based on your application. You can find information about AFINN here and download it from here.

让我知道您是否还有其他问题.

Let me know if you had further questions.

这篇关于博客情感分析的nltk NaiveBayesClassifier培训的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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