Questions tagged [sentiment-analysis]
Sentiment analysis refers to categorizing some given data as to what sentiment(s) it expresses. Usually, it refers to extracting sentiment from text, e.g. tweets or blog posts.
2,023
questions
0
votes
0
answers
3
views
how to open or create .raw.graph or .raw.tree files?
I'm working on this paper of absa where in the Dataset section I found these files - "test.raw.graph and test.raw.tree". As a beginner I want to know how can I open these files or create ...
-1
votes
0
answers
25
views
Classify emotions from a dataset using Machine / Deep Learning models
Planning to implement a classifier using Python to distinguish between emotions from the GoEmotions dataset (https://github.com/google-research/google-research/tree/master/goemotions). I need to use ...
1
vote
1
answer
40
views
ValueError: X has 1 features per sample; expecting 6209089 on uvicorn for my Sentiment analysis API
I built a sentiment analysis model and I am trying to deploy it using fastAPI. This is my code:
from fastapi import FastAPI
from pydantic import BaseModel
import pickle
import json
import numpy as np
...
-1
votes
0
answers
27
views
What addition should I make in my code for my fyp?
I am trying to make an fyp called Sentiment analysis on customer interaction. In this I take the audio of a person, convert it to text, analyze its sentiment, then based on the sentiment an action is ...
0
votes
0
answers
20
views
Extract lexicons from trained model in sentiment analysis
Is there any approach I can use to extract the learned lexicons with their polarities from the trained model on sentiment analysis?
I trained Arabert model to perform the sentiment analysis on Arabic ...
0
votes
1
answer
15
views
regarding nlp stemming and stop-words
I just got started with NLP in machine learning.
I was dealing with sentiment analysis for the Twitter dataset
the part where I am confused is if we remove stop-words before stemming the words will it ...
-1
votes
0
answers
13
views
Reverse-negators (eg. "helps") for sentiment analysis in R?
I am currently working on sentiment analysis using the Sentimentr package in R to investigate responses to a social and emotional learning program. I have encountered a situation where certain ...
-2
votes
1
answer
23
views
How can I edit Turkish sentence to get better and consistent sentiment analysis from a pre trained model?
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="savasy/bert-base-turkish-sentiment-cased")
sentence = &...
-1
votes
2
answers
47
views
Performing sentiment analysis using regex
I have a list of customer reviews and I must classify them as positive or negative using regular expressions (regex).
This is an example of a customer review, a list of positive keywords and negative ...
2
votes
1
answer
33
views
How to identify the the words in the sentence that contribute to the particular sentiment?
So I am using pretrained tranformers model to perform sentimental analysis but I want to check what are the words which leads to that particular sentiment class. Can anyone please guide me on what ...
0
votes
1
answer
36
views
Will using arguments - max_length, truncate, and padding in tranformers pipeline affect the output?
Hello so I was checking sentiment of a text using transformers pretrained model ,but doing so gave me error
RuntimeError: The size of tensor a (1954) must match the size of tensor b (512) at non-...
0
votes
1
answer
13
views
Combing Search Terms in gtrendsR package?
Within R, I am using the package gtrendsR. On the web version of google trends, one can "combine" search terms by putting plus signs between them as follows:
I believe this effectively ...
1
vote
0
answers
36
views
Text Mining newspaper pdf in R?
I am trying to extract all the text from a PDF (a newspaper front page) in R with the following code:
library(pdftools)
text<-pdftools::pdf_text(pdf = "https://www.nytimes.com/images/2013/06/...
0
votes
1
answer
23
views
transform sparse matrix to table
i got my dataset like this
and then i did my tf_idf vectorizertf idf code
and got thistf idf result
but when i want to make it look like a table using pandas, the result are 0 result when i try to ...
0
votes
0
answers
10
views
Is the VADER tool in python compatible with interview data?
Based on what I read about VADER, it is based on social media and is meant to analyze data from social media. I don't know how extensive and generalizable the dictionary is. Would it be appropriate/...
0
votes
0
answers
25
views
Creating label from sentiment analysis score (range for neutrality label)
For a project, I'm using the R package SentimentAnalysis and specifically the LM dictionary classifier. The tool gives an overall sentiment score.
Now, I need to create the labels from this score. One ...
0
votes
0
answers
21
views
"Size of tensor a must match size of tensor b" - When using transformer pipelines in Python?
I am currently working on a bot which can scrape data from posts on a website then categorize the comments on the posts as positive or negative (good or bad). Hence I am using the transformers....
0
votes
2
answers
127
views
How can I implement real-time sentiment analysis on live audio streams using Python?
I'm currently working on a project where I need to perform real-time sentiment analysis on live audio streams using Python. The goal is to analyze the sentiment expressed in the spoken words and ...
1
vote
0
answers
33
views
I was trying to use transformers by parsing the pipeline function for setiment analysis
While i was trying to perform sentiment analysis using transformers, then i parsed the pipeline function. Unfortunately, I ran into a runtime error: Failed to import transformers.models.distilbert....
0
votes
0
answers
29
views
I'm stuck in the first epoch of a sentiment classifier training process
I am trying to execute a code very similar to this one: https://www.kaggle.com/code/prakharrathi25/sentiment-analysis-using-bert/notebook
The only thing that i've changed is the database and the pre-...
0
votes
0
answers
28
views
how to use a trained model i built for a new csv file
I'm doing a sentiment analysis using python with machine learning, i am done from testing and training with my csv file, and i want to use the model i created for a new csv file i have. everything wok ...
0
votes
0
answers
32
views
I am getting API 403 error on orange data mining software while using Twitter keys
I am doing sentiment analysis using Twitter data. I got the keys and bearer token. The web site said it has ended free API Twitter version but still somehow when I signed up to the twitter developer i ...
2
votes
0
answers
38
views
I have text data to perform sentiment analysis. With 3 classes I want to create embeddings and get centroids of the data. Any ideas?
I have text data to perform sentiment analysis. With three classes (-1,0,1) I would like to create embeddings and get the centroids of the data so new data can be assigned according to the centroids ...
0
votes
1
answer
39
views
Calculating term frequency in text
I want to calculate how often specific words appear in different documents (similar to a sentiment analysis).
For this purpose, I've created a specific wordlist and I have stored all of my documents ...
0
votes
0
answers
26
views
Textual analysis in R
I am confused about the correct usage of sentiment analysis in R.
I want to do a textual analysis using the postive / negative list provided by Loughran and McDonald (https://sraf.nd.edu/...
1
vote
0
answers
42
views
error while using text function with lamdba
i am trying to use this ready code i found it online on github
I installed all the packages:
pip install NRCLex
pip install textblob
python -m textblob.download_corpora
And this is my code:
from ...
0
votes
1
answer
53
views
Web scrape hyperlinked text in R?
https://www.nber.org/papers?page=1&perPage=50&sortBy=public_date
The above webpage consists of a series of academic papers. The titles of these papers (e.g, Sparse Modeling Under Grouped ...
0
votes
1
answer
24
views
Can't use retrained sentiment analysis model
Not getting an error at all, the output is just using the regular corenlp sentiment analysis rather than my retrained version.
public static String filePath8 = "src/retraining/trees/model-0009-80....
0
votes
0
answers
40
views
PyTorch and ONNX give different results for compiled model
I have created a sentiment analysis model in PyTorch based on Bert as follows:
12 class BERTGRUSentiment(nn.Module): ...
0
votes
0
answers
34
views
Problem with PySpark and Kafka Streaming and PySparkML
i'm using wsl with ubuntu and pyspark 3.4.1, i want to be able to perform sentiment analysis on tweets through pyspark and spark streaming, using a model created through the spark ml library.
The ...
0
votes
1
answer
31
views
Deleting certain segments of strings in R?
In R, suppose I have the following string:
x<-"The bank is going after bank one and pizza and corn."
I would like to delete all segments of the string before the FINAL time bank appears ...
0
votes
0
answers
16
views
Retraining Sentiment Analysis Annotator: Changing File to a Binarized Tree Issues
I am trying to retrain the Sentiment Analysis Annotator. I am struggling with trying to change my file to a binarized tree with the following call:
$ java -mx5g edu.stanford.nlp.sentiment....
1
vote
1
answer
33
views
Having problems in displaying youtube comment sentiment analysis
Okay, please bear with me as this is basically a capstone project of mine in my university and the long and short objective of this project of ours is to make a program that will fetch 3 random ...
0
votes
0
answers
8
views
Getting error while applying the RegexpTokenizer
from nltk.tokenize import RegexpTokenizer
tokenizer = RegexpTokenizer(r'w+')
dataset['text'] = dataset['text'].apply(tokenizer.tokenize)
dataset['text'].head()
GETTING THIS ERROR:
enter image ...
0
votes
0
answers
13
views
Which types of data sets can I use for sentiment analysis?
I want unique dataset for sentiment analysis. Please suggest which dataset would be best for me. Whose accuracy is low or not available?
I'm trying Fiverr and Facebook-related datasets. I don't know, ...
3
votes
4
answers
95
views
Count subset of words occurrences in R?
In R, suppose I have a list of strings like the following:
str_list <- list("corn is food", "corn is good")
If I want to count the number of times each word in some subset of ...
0
votes
0
answers
9
views
Define synonyms in the tokeniser for Huggingface models
I was hoping I could define synonyms for huggingface models. So for a minimal example if we have some prompts where respondents says a sentence about what fastfood they like:
from transformers import ...
1
vote
0
answers
24
views
InvalidArgumentError: Graph execution error, 'logits shape and labels shape must have the same dimension'
I am trying to solve an aspect based sentiment analysis problem.
I have constructed an NN architecture which I believe is logical but had problems in finding the right loss function. or maybe my ...
0
votes
1
answer
32
views
How to conduct targeted sentiment analysis at the target level? (IBM Watson Cognitive)
I'm trying to assess the sentiment related to specific words that appear in a body of text. Currently I'm using IBM Watson's targeted sentiment analysis (natural_language_understanding.analyze). ...
1
vote
2
answers
125
views
Emoji count and analysis using python pandas
I am working on a sentiment analysis topic and there are a lot of comments with emojis.
I would like to know if my code is correct or is there a way to optimize it as well?
Code to do smiley count
...
-2
votes
1
answer
127
views
How to fix: IndexError: index 1 is out of bounds for axis 0 with size 1?
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
import nltk
from nltk.sentiment.vader import ...
0
votes
0
answers
20
views
I wanted to know if there are datasets available for sentiment analysis in spanish with labelled data like positive and negative
I have been searching for a sentiment analysis dataset which contains the data in spanish and labelled data with positive and negative remarks which can be used to train/fine tune a pre-trained model.
...
-1
votes
2
answers
61
views
Sentiments analysis with ML
hello am trying to train a model to use it to predict some news sentiments in my project but am stuck cause i only get a accuracy of 58%, i have already tried 2 different ML algorithms still the same ...
1
vote
1
answer
402
views
How to get the logits of the model with a text classification pipeline from HuggingFace?
I need to use pipeline in order to get the tokenization and inference from the distilbert-base-uncased-finetuned-sst-2-english model over my dataset.
My data is a list of sentences, for recreation ...
0
votes
0
answers
21
views
How can i get more than 230 'Reddit Thread' results with the 'RedditExtractoR' package?
For a research paper me and my team want to analyze the effects of the Corona Pandemic on the overall sentiment on vaccines. We would like to analyse the Reddit threads that contain any information ...
0
votes
3
answers
160
views
Modifying last layer of a pre-trained sentiment classification model to get a linear output
How can I modify a pre-trained sentiment classification model (e.g., 'bert-base-multilingual-uncased-sentiment') to output a value between 0 and 1 instead of a classification tensor? The output should ...
0
votes
0
answers
18
views
Calculate the conditional probability from a data frame?
I have this 2 data frame (the first one is a dataframe of terms and the likelihood for each class :
index
Positif
Negatif
moga
0.046053
0.007463
terang
0.006579
0.029851
........
........
........
...
0
votes
0
answers
92
views
Could not find matching concrete function to call loaded from the SavedModel (Shape Mismatch Issue)
Could not find matching concrete function to call loaded from the SavedModel.
You can access my code on Kaggle: https://www.kaggle.com/code/dyimahansah/nlp-competition-dansah
Once I attempt to train ...
1
vote
1
answer
315
views
How to generate sentiment scores using predefined aspects with deberta-v3-base-absa-v1.1 Huggingface model?
I have a dataframe , where there is text in 1st column and predefine aspect in another column however there is no aspects defined for few text ,for example row 2.
data = {
'text': [
"...
0
votes
1
answer
21
views
hoe to applied example in Sentiment analysis using textblob and naive bayes
Hi i am using amazon food dataset and my project about sentiment analysis i used TextBlob and naive Bayes models and after i get the accuracy for both
i wants t to applied each model in example like ...