Elastic Search : Match Query not working in Nested Bool Filters

I am able to get data for the following elastic search query : { "query": { "filtered": { "query": [], "filter": { "bool": { "must": [ { ...

AttributeError: 'float' object has no attribute 'lower'

I'm facing this attribute error and I'm stuck at how to handle float values if they appear in a tweet.The streaming tweet has to be lower cased and tokenized so i have used split function. Can...

What should be the size of Training data set for machine-learning?

I want to perform sentiment analysis on twitter tweets. So, I choose to use the datumbox-framework. I have small doubt what should be the size of my training samples? & if I'm collecting the...

Why do we get "Don't know how to add o to a plot" Error?

Trying to implement the twitter sentiment analysis. Everything worked fine, but when I try to make Barplots of tweets and getting the error as Error: Don't know how to add o to a plot When i...

How to extract COMPLAINT features from texts in order to classify complaints from non-complaints texts

I have a corpus of around 6000 texts with comments from social network (FB, twitter), news content from general and regional news and magazines, etc. I have gone through first 300 of these texts...

Train Model fails because 'list' object has no attribute 'lower'

I am training a classifier over tweets for sentiment analysis purposes. The code is the following: df = pd.read_csv('Trainded Dataset Sentiment.csv', error_bad_lines=False) df.head(5) #TWEET X =...

Determining the polarity of emoticons for twitter sentiment analysis

I am trying doing a sentiment analysis on twitter data and want to take the emoticons into account. Say I have the unicode of an emoticon 😀 (in this case U+1F600). I would like to get some kind...

Sentiment Analysis in R with tidyverse package - object 'sentiment' not found

I am trying to reproduce this exmple of sentiment analysis: https://www.kaggle.com/rtatman/tutorial-sentiment-analysis-in-r I have a "file.txt" with the text I want to analyze in "../input"...

How to remove Non English words in Python?

I am doing a sentiment analysis project in Python (using Natural Language Processing). I already collected the data from twitter and saved it as a CSV file. The file contains tweets, which are...

SpaCy OSError: Can't find model 'en'

even though I downloaded the model it cannot load it [[email protected] entity-sentiment-analysis]$ which python /scratch/sjn/anaconda/bin/python [[email protected] entity-sentiment-analysis]$ sudo python -m...

Kubernetes Port Forwarding - Connection refused

I am getting the following error when forwarding port. Can anyone help? mjafary$ sudo kubectl port-forward sa-frontend 88:82 Forwarding from 127.0.0.1:88 -> 82 Forwarding from [::1]:88 ->...

Unsupervised Sentiment Analysis on product reviews

I would like to perform an unsupervised sentiment analysis on the reviews posted by customers on different product web-page. Most of the online resources use supervised methods and the...

How to update the sentiment scores for some words in textblob?

I want to change the lexicon for Textblob by adding several new words with scores, and by slightly adjusting the score of the words that are already there. What is the best way to approach...

How can I install the ibm watson module?

I am trying to run IBM Watson's Natural Language Understanding in Python 3 but can't get the modules installed. This is what I started with: import json from ibm_watson import...

TypeError: clean() got an unexpected keyword argument

I am using python to do sentiment analysis on Colab Notebook. This is my code using Cleantext and spaCy. def prep(text): cleaned = clean(text, fix_unicode=True, to_ascii=True, lower=False,...

Sentiment analysis of Italian sentences

If you have any experience on sentiment analysis, could you please tell me how I can analyse these sentences, which tool, library, module should I need? I nostri test di laboratorio ti permettono...

Data PreProcessing for BERT (base-german)

I am working on a sentiment analysis solution with BERT to analyze tweets in german. My training dataset of is a class of 1000 tweets, which have been manually annotated into the classes neutral,...

Need to merge a sparse matrix and two columns from data frame in python

I have a sparse matrix with (881900, 76656) . Sprase matrix Dataframe with column(highlighted) of interest Both my dataframe and sparse matrix have the same number of rows, but have no columns in...

pyhton wordcloud of customer pain-points from customer reviews of any product

I have a case study to work on, in which there are several customer reviews available and I have to do the following predict their sentiment (positive, negative, neutral) based on...

Twitter+Apache Kafka+ Spark Structured Streaming doesn't work

I want to work some example codes from github(https://github.com/kaantas/spark-twitter-sentiment-analysis). I follow steps below; Started zkserver Started kafka 2.5.0 version (also i am using...

GPT3 : from next word to Sentiment analysis, Dialogs, Summary, Translation ....?

How does GPT3 or other model goes from next word prediction to do Sentiment analysis, Dialogs, Summaries, Translation .... ? what is the idea and algorithms ? How does it work ? F.e. generating...

textcat -> architecture extra fields not permitted

I've been trying to practise what I've learned from this tutorial:(https://realpython.com/sentiment-analysis-python/) using PyCharm. And this line: textcat.add_label("pos") generated a...

ValueError <ipython-input-65-8da781e9d890>

I faced a problem when I run deep learning with kerase lib. at the second line below code. X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.15, random_state =...

How to truncate input iin Huggingface pipeline?

I currently use a huggingface pipeline for sentiment-analysis like so: from transformers import pipeline classifier = pipeline('sentiment-analysis', device=0) The problem is that when I pass...

Installing Wordcloud Package using Conda on a M1 Mac

I'm relatively new in coding and wanted to start sentiment analysis project. One of my goals is to create a word cloud and I tried to install the Wordcloud package on my M1 Mac via conda-forge....

Tensorflow on macOS Apple M1

I am trying to install tensor flow on my macOS M1. As per chip compatibility I know that not all the pip images of tensor flow works or are even compatible. But I found this...

Fine-tuning a pretrained Spanish RoBERTa model for a different task, sentiment analysis

I'm doing sentiment analysis of Spanish tweets. After reviewing some of the recent literature, I've seen that there's been a most recent effort to train a RoBERTa model exclusively on Spanish text...

Is it necessary to re-train BERT models, specifically RoBERTa model?

I am looking for a sentiment analysis code with atleast 80%+ accuracy. I tried Vader and it I found it easy and usable, however it was giving accuracy of 64% only. Now, I was looking at some BERT...

Huggingface: NameError: name 'pipeline' is not defined

I try to execute the standard intro example from the HuggingFace documentation in a Jupiter notebook: from transformers import pipeline classifier = pipeline("sentiment-analysis") classifier("I've...

RuntimeError: Found dtype Long but expected Float when fine-tuning using Trainer API

I'm trying to fine-tune BERT model for sentiment analysis (classifying text as positive/negative) with Huggingface Trainer API. My dataset has two columns, Text and Sentiment, it looks like...