1,977 questions
0
votes
0
answers
42
views
AWS Lambda + LocalStack: How to Package NLTK/VADER for Sentiment Analysis Without Runtime Errors?
I'm working on a university project that involves building a serverless pipeline using AWS Lambda functions in a LocalStack environment. The pipeline processes customer reviews and performs ...
0
votes
0
answers
139
views
"Limit document size to: 5120 text elements" in Azure Sentiment Analysis Container
I'm trying to use the Azure Sentiment Analysis container in my local environment. It's working well with short document. But when I use a long document with
endpoint (http://localhost:5000/language/:...
0
votes
1
answer
75
views
Underfitting Pre-Trained Glove + LSTM Model: Accurcacy Unchanged [closed]
I am doing a sentiment classification using Pre-Trained Glove and LSTM model. I use google play review and scrap it by myself, resulting in 50k++ texts. I implement random over sampling on the ...
3
votes
1
answer
66
views
How can one obtain the "correct" embedding layer in BERT?
I want to utilize BERT to assess the similarity between two pieces of text:
from transformers import AutoTokenizer, AutoModel
import torch
import torch.nn.functional as F
import numpy as np
tokenizer ...
2
votes
2
answers
336
views
Textblob-de missing deprecated module textblob.translate()
I want to run a sentiment analysis on German headlines and would like to use textblob-de for it. After installing as described here: https://textblob-de.readthedocs.io/en/latest/readme.html#installing-...
-1
votes
1
answer
191
views
Capitalized words in sentiment analysis
I'm currently working with data of customers reviews on products from Sephora. my task to classify them to sentiments : negative, neutral , positive .
A common technique of text preprocessing is to ...
-1
votes
1
answer
65
views
How to upload the result of Naive Bayes Classifier into a table?
Recently I've started a Python sentiment analysis training course, wherein I've got the first task, that is to process a dataset of IMDB reviews through 2 different models: lexical analysis with ...
1
vote
0
answers
75
views
multihead self-attention for sentiment analysis not accurate results
i am trying to implement a model for sentiment analysis in text data using self-attention. In this example, i am using multi-head attention but cannot be sure if the results are accurate or not. It ...
-2
votes
1
answer
260
views
How to utilize Rauh's German Political Sentiment Dictionary
I need to utlize the named sentiment dictionary for my sentiment analysis in R studio. Unfortunately I have problems at that. The dictionary comes within a zip archive and specifically (as I assume) ...
0
votes
1
answer
85
views
How do RNNs handle negation in sentiment analysis
I'm trying to understand how Recurrent Neural Networks (RNNs), such as LSTM or GRU models or just a simple RNN, handle negation in sentiment analysis. Specifically, I'm curious about how these models ...
1
vote
3
answers
242
views
Getting GloVe embeddings using gensim, triu not found in scipy.linalg
I am trying to build a sentiment analysing model, using the GloVe word embeddings...
I found multiple sources on how to import the embeddings into python, this one seemed to be the simplest...
Trying ...
0
votes
1
answer
57
views
Trying to run GermanSentiment in Python on 10k to 30k texts, keeps crashing? Possibly too large dataset?
I want to do sentiment analysis on 2 datasets of tweets, one with 9k strings and one with 30k strings. I have imported GermanSentiment and it ran just fine with the demo code from GitHub, but when I ...
0
votes
1
answer
338
views
PyABSA for Aspect Based Sentiment ANalysis
I am working on Aspect based Sentiment Analysis and came across this nice package - PyABSA.
I've found that version 2 is problematic with the models not getting loaded, so I'm using version 1.
There ...
1
vote
1
answer
278
views
How to remove stop words in Power Query Editor in Power BI
I've loaded an Excel file with reviews into Power BI Desktop. I want to do Sentiment Analysis on the file. I've already turned everything in the reviews column(named Column3) to lowercase and removed ...
1
vote
0
answers
82
views
My sentiment analysis is giving wrong predictions
I have a dataframe that contains two columns: tweets and labels(offensive language, hate speech, no hate and offensive).
I cleaned the tweets and created my model.
But after modelling, all my test ...
2
votes
2
answers
110
views
Python Libraries for Sentence Classification Based on Keyword
I want to separate a list of sentences into two lists based on whether they match the sentiment of a specific keyword. For example:
valid_keyword = "Guest Accepted"
sentences = [
"...
0
votes
1
answer
650
views
How do I perform Multiple Linear Regression using Statsmodels module when the data is in pandas
Im trying to do an MLR using data from two dataframes but one has a different size to the other hence Im getting endog and exog size mismatch. I was wondering if anyone could help me understand how to ...
1
vote
0
answers
193
views
How to change the labels of a pretrained hugging face model?
I am using below pretrained hugging face model for sentiment analysis:
"cardiffnlp/twitter-roberta-base-sentiment-latest"
And it's providing three sentiments - Positive, Negative and Neutral
...
1
vote
1
answer
49
views
How can i get the first content of a python synsets list?
enter image description hereI have a scrapped text stored under the variable "message".
I have removed the StopWords and stored the result with the variable "without_stop_words".
I ...
2
votes
1
answer
249
views
Issue Accessing .bin Files in React Native App
I'm encountering an issue with accessing .bin files in my React Native app. I followed the process of saving my TensorFlow model in .h5 format, converting it to JSON and binary files, and then moving ...
1
vote
0
answers
57
views
How to save all of the recently recorded real-time audio into a .mp3 or a .wav file?
I hope you are all well. I was trying to implement a multimodal sentiment analysis fyp. I was modifying my audio component. I was curious how to save all of a recently recorded real-time audio into a ....
1
vote
0
answers
227
views
(Huggingface) Using fine tuned mode for inference over a dataset
I am very new to this so I apologise if this is a dumb question, but for some reason, it seems to be pretty hard for me to just use an already trained transformer model to make inference.
So basically,...
0
votes
1
answer
272
views
I ran a VADER sentiment analysis on mulitple files and the compound score for all of them was 1; how can I validate this result?
I have transcript files from 6 different interviews, and am running a sentiment analysis on the text using VADER. The compound score for all the files was 1. This does not seem correct to me, but I'm ...
-1
votes
1
answer
74
views
Must have equal len keys and value when setting with an iterable error
while writing the data into dataframe I faced this issue
ValueError: Must have equal len keys and value when setting with an iterable.
This csv has 98 rows in which I'm trying to assign values to ...
0
votes
0
answers
93
views
sentiment.polarity doesn't seem to be working in python
Trying to generate a sentiment and polarity score for reviews.
For some reason, the sentiment score is always negative.
blob.sentiment.polarity does not seem to work
Defining a new variable ...
0
votes
1
answer
95
views
Determining an Acceptable Baseline for Sentiment Analysis using RNNs
I've been experimenting with sentiment analysis using Recurrent Neural Networks (RNNs) following a tutorial I found here. While my model is functional, I've hit a roadblock with its accuracy, ...
0
votes
0
answers
545
views
Public_Profile permission in Meta GraphAPI
I have Public_Profile permission in Meta GraphAPI but I'm unable to Generate Access Token. Can someone help me?
I am hoping to fetch public posts using the API. I have a Researcher permission for the ...
0
votes
0
answers
45
views
Empty data frame in pandas
df=pd.DataFrame(data, columns=["Date", "Time", "Contact", "Message"])
df['Date']=pd.to_datetime(df['Date'])
data=df.dropna()
from nltk.sentiment.vader import ...
0
votes
0
answers
62
views
Need guidance in understanding the reason of my ML model's failure
I am a beginner in ML and thus was watching a video for my project on intro to huggingface and sentiment analysis and followed each step side by side/
But the prediction i am getting is not expected ...
0
votes
0
answers
77
views
Is there a way to change the sentiment score for a word in AFINN lexicon?
I'm doing a sentiment analysis on text in the r/travel subreddit and for obvious reasons, the word 'negative' is attached with a negative sentiment score. In this specific context, a negative test ...
1
vote
1
answer
634
views
GridSearchCV takes too long to run
I have been working on the below script for sentimental analysis and am running into some problems related to the performance of the Grid search - it's taking a very long time to complete & I ...
0
votes
0
answers
147
views
IndexError: index out of range in self ( Google Colab notebook ) while implementing Roberta Pretrained Model
res = {}
for i, row in tqdm(df.iterrows(), total=len(df)):
try:
text = row['text']
myid = row['id']
vader_result = sia.polarity_scores(text)
vader_result_rename = {}...
1
vote
1
answer
75
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
...
0
votes
0
answers
38
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
80
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 ...
-2
votes
1
answer
85
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
315
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
435
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
972
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
71
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
98
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
65
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 ...
4
votes
2
answers
3k
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
679
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....
2
votes
0
answers
82
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
136
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 ...
1
vote
0
answers
59
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
69
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
32
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
1
answer
41
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 ...