sentiment-analysis

R sentiment analysis with phrases in dictionaries

余生长醉 提交于 2019-11-30 16:34:05
I am performing sentiment analysis on a set of Tweets that I have and I now want to know how to add phrases to the positive and negative dictionaries. I've read in the files of the phrases I want to test but when running the sentiment analysis it doesn't give me a result. When reading through the sentiment algorithm, I can see that it is matching the words to the dictionaries but is there a way to scan for words as well as phrases? Here is the code: score.sentiment = function(sentences, pos.words, neg.words, .progress='none') { require(plyr) require(stringr) # we got a vector of sentences.

NLTK and Stopwords Fail #lookuperror

空扰寡人 提交于 2019-11-29 22:48:13
I am trying to start a project of sentiment analysis and I will use the stop words method. I made some research and I found that nltk have stopwords but when I execute the command there is an error. What I do is the following, in order to know which are the words that nltk use (like what you may found here http://www.nltk.org/book/ch02.html in section4.1): from nltk.corpus import stopwords stopwords.words('english') But when I press enter I obtain --------------------------------------------------------------------------- LookupError Traceback (most recent call last) <ipython-input-6

Training data for sentiment analysis [closed]

无人久伴 提交于 2019-11-29 19:14:17
Where can I get a corpus of documents that have already been classified as positive/negative for sentiment in the corporate domain? I want a large corpus of documents that provide reviews for companies, like reviews of companies provided by analysts and media. I find corpora that have reviews of products and movies. Is there a corpus for the business domain including reviews of companies, that match the language of business? Gregory Marton http://www.cs.cornell.edu/home/llee/data/ http://mpqa.cs.pitt.edu/corpora/mpqa_corpus You can use twitter, with its smileys, like this: http://web.archive

Feature Selection and Reduction for Text Classification

*爱你&永不变心* 提交于 2019-11-29 18:41:46
I am currently working on a project, a simple sentiment analyzer such that there will be 2 and 3 classes in separate cases . I am using a corpus that is pretty rich in the means of unique words (around 200.000). I used bag-of-words method for feature selection and to reduce the number of unique features , an elimination is done due to a threshold value of frequency of occurrence . The final set of features includes around 20.000 features, which is actually a 90% decrease , but not enough for intended accuracy of test-prediction. I am using LibSVM and SVM-light in turn for training and

Is there any other package other than “sentiment” to do Sentiment Analysis in R? [closed]

我的梦境 提交于 2019-11-28 18:28:32
The "sentiment" package in R was removed from the Cran repository. What are the other packages which can do Sentiment Analysis? For example, how I can rewrite this using other packages? library(sentiment) # CLASSIFY EMOTIONS classify_emotion(some_txt,algorithm="bayes",verbose=TRUE) # classify polarity class_pol = classify_polarity(some_txt, algorithm="bayes") Where documents here is defined as: # DEFINE text some_txt<- c("I am very happy at stack overflow , excited, and optimistic.", "I am very scared from OP question, annoyed, and irritated.") agstudy I can't find sentiment package.This is

NLTK and Stopwords Fail #lookuperror

╄→гoц情女王★ 提交于 2019-11-28 18:18:43
问题 I am trying to start a project of sentiment analysis and I will use the stop words method. I made some research and I found that nltk have stopwords but when I execute the command there is an error. What I do is the following, in order to know which are the words that nltk use (like what you may found here http://www.nltk.org/book/ch02.html in section4.1): from nltk.corpus import stopwords stopwords.words('english') But when I press enter I obtain ---------------------------------------------

Sentiment analysis using R [closed]

跟風遠走 提交于 2019-11-28 15:44:42
Are there any R packages that focus on sentiment analysis? I have a small survey where users can write a comment about their experience of using a web-tool. I ask for a numerical ranking, and there is the option of including a comment. I am wondering what the best way of assessing the positiveness or negativeness of the comment is. I would like to be able to compare it to the numerical ranking that the user provides, using R. And there is this package : sentiment: Tools for Sentiment Analysis sentiment is an R package with tools for sentiment analysis including bayesian classifiers for

Training data for sentiment analysis [closed]

纵饮孤独 提交于 2019-11-28 14:52:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Where can I get a corpus of documents that have already been classified as positive/negative for sentiment in the corporate domain? I want a large corpus of documents that provide reviews for companies, like reviews of companies provided by analysts and media. I find corpora that have reviews of products and

Best Algorithmic Approach to Sentiment Analysis [closed]

好久不见. 提交于 2019-11-28 03:02:35
My requirement is taking in news articles and determining if they are positive or negative about a subject. I am taking the approach outlined below, but I keep reading NLP may be of use here. All that I have read has pointed at NLP detecting opinion from fact, which I don't think would matter much in my case. I'm wondering two things: 1) Why wouldn't my algorithm work and/or how can I improve it? ( I know sarcasm would probably be a pitfall, but again I don't see that occurring much in the type of news we will be getting) 2) How would NLP help, why should I use it? My algorithmic approach (I

Sentiment Analysis Dictionaries

淺唱寂寞╮ 提交于 2019-11-27 16:56:01
I was wondering if anybody knew where I could obtain dictionaries of positive and negative words. I'm looking into sentiment analysis and this is a crucial part of it. Stompchicken The Sentiment Lexicon , at the University of Pittsburgh might be what you are after. It's a lexicon of about 8,000 words with positive/neutral/negative sentiment. It's described in more detail in this paper and released under the GPL. Arriving a bit late I'll just note that dictionaries have a limited contribution for sentiment analysis. Some sentiment bearing sentences do not contain any "sentiment" word - e.g.