sentiment-analysis

Google Natural Language Sentiment Analysis Aggregate Scores

 ̄綄美尐妖づ 提交于 2020-01-15 06:27:09
问题 In this part of the documentation of the Google Cloud Platform Natural Language API, it is described that The overall score and magnitude values for an entity are an aggregate of the specific score and magnitude values for each mention of the entity. I can't figure out how this aggregation works. In the example provided in the documentation, Marvin Gaye has two mentions. One of the mentions has a sentiment of 0.4 and a magnitude of 0.4, the other mention has a score of -0.2 and a magnitude 0

Google Natural Language Sentiment Analysis Aggregate Scores

不问归期 提交于 2020-01-15 06:27:06
问题 In this part of the documentation of the Google Cloud Platform Natural Language API, it is described that The overall score and magnitude values for an entity are an aggregate of the specific score and magnitude values for each mention of the entity. I can't figure out how this aggregation works. In the example provided in the documentation, Marvin Gaye has two mentions. One of the mentions has a sentiment of 0.4 and a magnitude of 0.4, the other mention has a score of -0.2 and a magnitude 0

negation handling in R, how can I replace a word following a negation in R?

谁说我不能喝 提交于 2020-01-13 20:23:10
问题 I'm doing sentiment analysis for financial articles. To enhance the accuracy of my naive Bayes classifier, I'd like to implement negation handling. Specifically, I want to add the prefix "not_" to the word following a "not" or "n't" So if there's something like this in my corpus: x <- "They didn't sell the company." I want to get the following: "they didn't not_sell the company." (the stopword "didn't" will be removed later) I could find only the gsub() function, but it doesn't seem to work

negation handling in R, how can I replace a word following a negation in R?

不羁的心 提交于 2020-01-13 20:23:07
问题 I'm doing sentiment analysis for financial articles. To enhance the accuracy of my naive Bayes classifier, I'd like to implement negation handling. Specifically, I want to add the prefix "not_" to the word following a "not" or "n't" So if there's something like this in my corpus: x <- "They didn't sell the company." I want to get the following: "they didn't not_sell the company." (the stopword "didn't" will be removed later) I could find only the gsub() function, but it doesn't seem to work

tidytext R in spanish - any alternative?

家住魔仙堡 提交于 2020-01-11 09:32:06
问题 I'm doing sentiment analysis from twitter but my tweets are on Spanish so I can't use tidytext to classify the words. Does anyone know if there is a similar package for Spanish? 回答1: There are not a lot of good open source options for sentiment lexicons in non-English languages right now, unfortunately. You can request the NRC lexicon in other languages from the authors; it is translated by Google Translate (which of course adds uncertainty but has shown to be mostly OK overall) and the

tidytext R in spanish - any alternative?

假装没事ソ 提交于 2020-01-11 09:31:49
问题 I'm doing sentiment analysis from twitter but my tweets are on Spanish so I can't use tidytext to classify the words. Does anyone know if there is a similar package for Spanish? 回答1: There are not a lot of good open source options for sentiment lexicons in non-English languages right now, unfortunately. You can request the NRC lexicon in other languages from the authors; it is translated by Google Translate (which of course adds uncertainty but has shown to be mostly OK overall) and the

from google.cloud import language ImportError: No module named cloud

烈酒焚心 提交于 2020-01-05 09:24:09
问题 Trying to use Google Sentiment Analysis. Here is the code I got from the Google tutorial. """Demonstrates how to make a simple call to the Natural Language API.""" import argparse from google.cloud import language def print_result(annotations): score = annotations.sentiment.score magnitude = annotations.sentiment.magnitude for index, sentence in enumerate(annotations.sentences): sentence_sentiment = sentence.sentiment.score print('Sentence {} has a sentiment score of {}'.format( index,

Score Sentiment function in R, return always 0

[亡魂溺海] 提交于 2020-01-03 00:45:52
问题 I have a (probably) stupid problem with score.sentiment I'm trying to use this function with 3 default phrases, the problem is that the function return score 0.0.0, but it should return 2.-5.4 I don't understand the problem because RGui don't give me errors and I'm following a tutorial! I've dowloaded lists for negative and positive words with hu.liu.pos = scan('https://www.dropbox.com/sh/3xctszdxx4n00xq/AAA_Go_Y3kJxQACFaVBem__ea/positive-words.txt?dl=0', what='character', comment.char=';');

How to implement TF_IDF feature weighting with Naive Bayes

有些话、适合烂在心里 提交于 2020-01-01 17:28:08
问题 I'm trying to implement the naive Bayes classifier for sentiment analysis. I plan to use the TF-IDF weighting measure. I'm just a little stuck now. NB generally uses the word(feature) frequency to find the maximum likelihood. So how do I introduce the TF-IDF weighting measure in naive Bayes? 回答1: You can visit the following blog shows in detail how do you calculate TFIDF. 回答2: You use the TF-IDF weights as features/predictors in your statistical model. I suggest to use either gensim [1]or

How to implement TF_IDF feature weighting with Naive Bayes

谁说我不能喝 提交于 2020-01-01 17:28:00
问题 I'm trying to implement the naive Bayes classifier for sentiment analysis. I plan to use the TF-IDF weighting measure. I'm just a little stuck now. NB generally uses the word(feature) frequency to find the maximum likelihood. So how do I introduce the TF-IDF weighting measure in naive Bayes? 回答1: You can visit the following blog shows in detail how do you calculate TFIDF. 回答2: You use the TF-IDF weights as features/predictors in your statistical model. I suggest to use either gensim [1]or