344 questions
0
votes
1
answer
25
views
Can't iterare Textblob classifier in a dataframe
I've been successful in training a TextBlob NaiveBayes sentiment classifier, with fairly high accuracy, and I'm trying to iterate it in a comment dataset to do a coder reliability test. The only issue ...
0
votes
0
answers
257
views
.xlsx file corrupt after download from POST API, but working fine in Postman
I have implemented an POST API for downloading some file from the browser, triggering which leads to download the file in my local system from the server through flask API.
Now when opening the file, ...
2
votes
2
answers
334
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-...
0
votes
1
answer
101
views
getting decimal places in confidence intervals for survey analysis
I am using the below R code but cannot figure our how to get the confidence intervals with two decimal places:
library(gtsummary)
survey::svydesign(id = ~PSU, weights = ~WT_analysis, strata = ~...
1
vote
1
answer
893
views
'TextBlob' object has no attribute 'detect_language'
i used : words=TextBlob(text_)
lan=words.detect_language() in my code and it displays TextBlob object has no attribute detect_language as error
i have tried various modifications from chatgpt and ...
-1
votes
1
answer
820
views
Textblob language translation
from textblob import TextBlob
trans = TextBlob("text")
translated_text = trans.translate(to='en')
print("Translated text:", translated_text)
While running this code, I'm ...
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 ...
3
votes
2
answers
203
views
Finding the nouns in a sentence given the context in Python
How to find the nouns in a sentence regarding the context? I am using the nltk library as follows:
text = 'I bought a vintage car.'
text = nltk.word_tokenize(text)
result = nltk.pos_tag(text)
result = ...
0
votes
0
answers
109
views
Using Python to find noun phrase and dependency
I'm trying to find a noun phrase from a set of sentences and output whether the sentence is true or false based on its presence.
For an example, following are four samples
s1 = "he reported red ...
0
votes
0
answers
41
views
SQl Loop through a column text field to find ids and join those ids with another table
A column contains a large text and belongs to table A.
Column Content: blablabla 123 id:ID1 id:ID2 id:ID3 id:ID4 xyz
The contents of the column field are not known but I have a function which getsID ...
0
votes
1
answer
72
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 ...
1
vote
1
answer
163
views
Why do I get an HTTP Error 400 when using TextBlob and how can i resolve?
I am experiencing some problems using the TextBlob library. I'm trying to run a very simple piece of code like this:
from textblob import TextBlob
text1 = TextBlob('I looked for Mary and Samantha at ...
0
votes
0
answers
85
views
Download file using javascript not working
i want to download array stored in filtered variable as text file but no file download while running code. If i create an array like this var data = [255,626,626,"xyz"] and use it, i am ...
0
votes
2
answers
2k
views
Detect language in pandas column in python
I would like to detect language in pandas column in python. After detecting it I want to write the language code as a column in pandas dataframe. Below is my code and what I tried. But I got an error ...
0
votes
1
answer
93
views
Do not change tense within quote
I am using Tenseflow's change_tense method to change a present tense to past tense.
But verbs within double quotes are getting changed. They should remain the same.
Example:
Input: Robin will say “...
1
vote
0
answers
1k
views
How to get complex words from a text file in python?
I have a text file. I want to get the sum of all the complex words from this text file.
Complex words here means a word which has more than 2 syllables, excluding some exceptions like words ending ...
1
vote
1
answer
367
views
Applying Textblob to dataframe returns characters instead of textblob object
I am trying to apply textblob like so:
df['newtext'] = df['text'].apply(lambda x: TextBlob(x))
but that tokenizes "text" and returns (I, ', v, e, , b, e, e, n, , u, s, i, n, g,...) instead ...
1
vote
0
answers
362
views
Installation of TextBlob in python 3.9.7
please excuse my question, I am a total beginner.
I want to use TextBlob in python to perform a sentiment analysis on german Twitter data. Everything seems to work so far, except the downloads/updates ...
3
votes
2
answers
174
views
How can I find the Word List or dictionary with Polarity Score of TextBlob?
I need the total list or dictionary with Polarity Score of TextBlob. I search many online sites but can not find the list. I know the way to get polarity of a sentence or word. How can I find that?
0
votes
2
answers
4k
views
how to convert BLOB data-type to string or in text in node.js
I am using the blob data type to store the blog data in MySql in node.js. It stores the data when I get the data from the database it returns the blob data. now I want to convert the blob data to ...
0
votes
0
answers
605
views
Why does the SQlite function executemany run slow with updating large amount of data?
I'm new to SQlite and I ran into a problem while trying to update 2 columns of a SQlite database for a sentiment analysis on tweets using the TextBlob library. I have to update 6.5 million rows and I ...
0
votes
1
answer
275
views
Pyspark in GCP: ModuleNotFoundError: No module named 'textblob'
I am using udf function in Pyspark in jupyter notebook on GCP. I wanted to use Textblob to do the sentiment analysis on text. I have already imported textblob in the notebook and i have tried the ...
0
votes
0
answers
352
views
How to convert argument passed to string with TextBlob?
I'm trying to learn how to scrape tweets using python. I'm trying to use the following code, but I keep getting the error. I'm not sure how to rectify it.
def fetch_tweets(query, count = 50):
api =...
1
vote
1
answer
643
views
spark-submit with external python packages
I am using the python textblob package to calculate the sentiment in a spark job. In order to make the textblob package available on the spark cluster, I created a virtual environment, installed the ...
0
votes
1
answer
50
views
how to use dataframe apply function with conditions
I have a dataframe composed of two columns tweet and lang. I want to extract sentiment based on the language in each row. the language is precised in the second column. I am using "TextBlob" ...
0
votes
1
answer
388
views
How to remove unexpected parameter and attribute errors while importing data for sentiment analysis from twitter?
Q)
How to solve the following errors
1)Unexpected parameter: Lang
2)Unexpected parameter: tweet_node
3)line 25, in
tweets = [tweet.full_text for tweet in tweet_cursor ]
AttributeError: 'Status' ...
0
votes
1
answer
138
views
Why my output return in a strip-format and cannot be lemmatized/stemmed in Python?
First step is tokenizing the text from dataframe using NLTK. Then, I create a spelling correction using TextBlob. For this, I convert the output from tuple to string. After that, I need to lemmatize/...
0
votes
1
answer
1k
views
HTTPError: HTTP Error 400: Bad Request (using textblob in py)
i´m experimenting some troubles with texblob... i got a dataframe from Tweeter API and i'm trying to get a Sentimental Analysis through textblob but i was unable to do it due tooo:
from time import ...
1
vote
2
answers
225
views
Textblob module not being found in pyspark dataproc cluster
Im using Dataproc cloud for spark computing. The problem is that my working nodes dont have access to textblob package. How can I fix it?
I'm coding in jupyter notebook with pyspark kernel
Code error:
...
1
vote
1
answer
362
views
Text Cleaning before using TextBlob for Sentiment Analysis
Do you clean the text (data) before using TextBlob or do you use TextBlob first and then clean the text (from punctuation, stopwords etc)?
-1
votes
1
answer
891
views
Translator on python not working, coming with error saying 'BaseBlob.translate() got an unexpected keyword argument'
from tkinter.constants import COMMAND
from typing import Text
from PIL import Image, ImageSequence, ImageTk
from googletrans.constants import LANGUAGES
import inflect
from googletrans import ...
1
vote
2
answers
75
views
How to determine 'did' or 'did not' on something
What's the straightforward way to distinguish between this two:
the movie received critical acclaim
the movie did not attain critical acclaim.
Seems to me 'sentiment analysis' of nlp could do it for ...
0
votes
0
answers
247
views
Using TextBlob library to understand sentiment and some sentences are coming back with 0 for polarity and sensitivity
I have searched threads on here and found one other question that was the same but I did not understand the answer.
I am trying to understand sentiment of comments in a survey and for the comments ...
2
votes
1
answer
1k
views
Is it possible to do emojis sentiment analysis using textblob?
I am running sentiment analysis on WhatsApp chats using textblob and the result is working on just text but I am getting neutral results on emojis.
Is there a way that textblob would see smiling ...
0
votes
1
answer
244
views
Transcript transformation for sentiment analysis
I'm doing sentiment analysis on users' transcripts for UX website testing. I get the transcript from the testing session and then I analyze the transcript for sentiment analysis - what's the user's ...
8
votes
0
answers
4k
views
HTTPError: HTTP Error 400: Bad Request on translate TextBlob
I'm trying to translate a text with the TextBlob library, but the following HTTPError error is appearing: HTTP Error 400: Bad request, can someone help me with this?
Observation:
I'm using VSCode to ...
0
votes
1
answer
384
views
NLP on a xlsx worksheet - single column
Hi I am seriously confused with how to conduct a NLP.
My goal is to conduct sentiment analysis on a 'Review' of a product.
data = pd.read_excel('ProductData.xlsx')
print(data.dtypes)
Clothing ID ...
1
vote
2
answers
1k
views
How to prevent deletion of a blob?
Is it possible to make a particular blob non delete able? If so, how? I want one blob to stay forever and no one should be able to delete that.
1
vote
1
answer
548
views
Using an average of VADER and textBlob's sentiment polarity gives me a more accurate result, why?
I have a manually labelled set of ~120K tweets. If I use VADER's compound score it only matches the manual labelling for ~24% of the records, textblob matches ~35% of the manually labelled record. If ...
1
vote
1
answer
212
views
Get score on fileds that detect angry behaviour - Python Sentiment Analysis
I have reviews for products in a dataframe 'dfa' from customers in the format below. I want to add another column with score/flag on how 'angry' the review sounds.
Service_id
Review
a1
Pathetic ...
4
votes
3
answers
4k
views
"HTTPError: HTTP Error 404: Not Found" while using translation function in TextBlob
When I try to use translate function in TextBlob library in jupyter notebook, I get:
HTTPError: HTTP Error 404: Not Found
I have posted my code and screenshot of error message for reference here. ...
2
votes
2
answers
5k
views
textblob .detect_language() function not working
So I have been trying out coding and am currently finding some language detection packages and found out about textblob, but I am having some sort of proble.
This is my code:
# - *- coding: utf- 8 - *-...
2
votes
1
answer
1k
views
Textblob OCR throws 404 error when trying to translate to another language
I have a 5 line simple program to translate a language to English via OCR Textblob.
But for some reason, it throws 404 error!!!
from textblob import TextBlob
text = u"おはようございます。"
tb = ...
8
votes
1
answer
6k
views
Why do I get an HTTP Error 404 when using TextBlob?
I am experiencing some problems using the TextBlob library. I'm trying to run a very simple piece of code like this:
from textblob import TextBlob
text = 'this is just a test'
blob = TextBlob(text)
...
1
vote
1
answer
124
views
Extract Sentences from review column and adding it in a new column, repeating the other rows for each new sentence
I have 3 columns. Review, Date and Review Rating. I want to split reviews into sentences and add the sentences under a new column, but the other rows should repeat based on the number of sentences.
...
0
votes
0
answers
163
views
Find the top terms based off on TF-IDF scores across an entire column in a data frame
I'm working on a script that will run through a column of article titles (read in from a .csv) in a data frame and calculate term frequency across the rows in this column using TF-IDF, list these ...
1
vote
1
answer
329
views
Natural language processing for hinglish tweets
I have used textblob to assign polarity score to english tweets.Can textblob be used to assign polarity score to Hinglish tweets?
If yes how?
Thankyou
0
votes
1
answer
217
views
How to remove "TextBlob" from my output list
I'm trying TextBlob lately and wrote a code to correct a sentence with misspelt words.
The program will return the corrected sentence and also return the list of misspelt words.
Here is the code;
from ...
1
vote
0
answers
332
views
How to extract noun phrases from a sentence using pre-trained BERT?
I want to extract noun phrases from sentence using BERT. There are some available libraries like TextBlob that allows us to extract noun phrases like this:
from textblob import TextBlob
line = "...
1
vote
1
answer
95
views
How to run a Excel document through a Python program
I am trying to run a few hundred Trip Advisor reviews through a Sentiment Analysis program (via textblob), so that it will read each review and provide a sentiment for it. The program already works in ...