文本分析规则集-自然语言处理 [英] Set of rules for textual analysis - Natural language processing
问题描述
是否存在包含用于文本分析/自然语言处理的规则的指南?
Does there exist a guide with a set of rules for textual analysis / natural language processing?
您是否有一些专门开发的软件包(例如,在Python中)用于文本情感分析?
Do you have some specific developed package (e.g. in Python) for textual sentiment analysis?
这是我遇到的应用程序:
Here is the application I am faced with:
假设我有两个字典,A和B.A包含负"字,B包含正"字.我可以做的是 count 负数和正数.
Let's say I have two dictionaries, A and B. A contains "negative" words, and B contains "positive" words. What I can do is count the negative and the positive number of words.
这产生了一些问题,例如以下内容:假设"exceptionally
"是一个positive
单词,而"serious
"是一个negative
单词.
This created some issues, such as the following: let's suppose that "exceptionally
" is a positive
word, and "serious
" is a negative
word.
如果我两个单词紧随其后,则我为"exceptionally serious"
.在这种情况下,这两个词会相互抵消,这意味着我有1个否定词和1个肯定词.这是不正确的,因为实际上这是双重否定.
If I have the two words following each other, I have "exceptionally serious"
. In such a case, the two words cancel each other, which means I have 1 negative and 1 positive word. This is not true, because in reality it is a double negative.
所以,我的问题是,是否可以应用一套规则来改进代码,或者是否已经考虑了一些软件机制,并应用文本情感分析?在应用了一套规则(例如双重否定)
So, my question is, is there a set of rules I can apply so that I improve my code, or is there some software that already takes into account such mechanisms, and applies textual sentiment analysis? Is there some implementation which I can feed the dictionaries and provide me with textual sentiment after it applies a set of rules such as double negatives?
推荐答案
我们在圣地亚哥州立大学使用nltk和python进行了情感分析.真的很有趣,很容易!以 http://text-processing.com/demo/sentiment/为例,我输入了非常严重",而且它知道它是NEG.
We did sentiment analysis at San Diego State using nltk with python. Really fun and easy! http://text-processing.com/demo/sentiment/ for an example I entered "exceptionally serious" and it knows that it is NEG.
足够容易遵循的示例: http://www.laurentluce.com/posts/twitter-sentiment-analysis-using-python-and-nltk/
easy enough example to follow: http://www.laurentluce.com/posts/twitter-sentiment-analysis-using-python-and-nltk/
这篇关于文本分析规则集-自然语言处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!