Questions tagged [textblob]

Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more

TextBlob is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.

342 questions
0
votes
1 answer

Is there any feature of TextBlob to obtain neutral classification?

I am interested in building a text classifier using textBlob but from my research does not look like after you train the classifier to return neutral tags. Does anyone know a way to implement this ? Or is there a similar library which provides…
Pca
  • 7
  • 7
0
votes
0 answers

Can I use textblob to predict a likert scale outcome?

I have about 300 participants who generated 45 short situations each (though many participants wrote the same situation) and rated the degree that they would feel anxious in that situation (1-5 likert scale). Sample data: train = [('being at a…
Xander
  • 593
  • 1
  • 5
  • 19
0
votes
0 answers

Why is Python only performing an action on the first iteration of a loop

I have a small little loop running through the oxford dictionary looking for and printing out any word who's definition has one of the words in search_list But when I run it with for example the list: `['hello', 'next', 'from'] it only runs through…
wprins
  • 846
  • 2
  • 19
  • 35
0
votes
3 answers

Using directory as input for tf-idf with python `textblob`

I am trying to adapt this code (source found here)to iterate through a directory of files, instead of having the input hard-coded. #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division, unicode_literals import math from…
loropro
  • 15
  • 3
0
votes
1 answer

How to decode ascii from stream for analysis

I am trying to run text from twitter api through sentiment analysis from textblob library, When I run my code, the code prints one or two sentiment values and then errors out, to the following error: UnicodeDecodeError: 'ascii' codec can't decode…
RustyShackleford
  • 3,462
  • 9
  • 40
  • 81
0
votes
1 answer

The use of Textblob for multiple domain tweets for sentiment

I'm building an application that analyze sentiment for news-related tweets in different domains, such as sports, disaster and technology, I'm using Textblob with the default mode (PatternAnalyzer). Does that provide a good sentiment even though…
Ghada
  • 3
  • 2
0
votes
1 answer

resource not found python textblob Resource u'tokenizers/punkt/english.pickle' not found

The link below shows a similar issue except that his was solved downloading the packages and I already downloaded the packages... Resource u'tokenizers/punkt/english.pickle' not found But The weird thing is that I am able to run this on the terminal…
0
votes
1 answer

PySpark textblob from NLTK used in map MissingCorpusError

I am trying to implement function for text preprocessing in PySpark. I have amazon EMR where I am installing Python dependencies from the bootstrap script. One of these dependencies is textblob "python -m textblob.download_corpora". Then I am trying…
ziky90
  • 2,627
  • 4
  • 33
  • 47
0
votes
1 answer

How to add dictionary to json object

In my construct below, I am trying to pass a JSON object through my web service. As a new requirement I have to pass a dictionary object which is sent in the code below. Can you please guide me how to add the dictionary to JSON object? if plain_text…
miku
  • 95
  • 1
  • 2
  • 11
0
votes
1 answer

Train data from csv python textblob

I have a CSV file I am trying to train on a classifier. I am using TextBlob. This is my code that does it. with open('train.csv', 'r') as fp: cl = NaiveBayesClassifier(fp, format='csv', feature_extractor= get_features) It however does not seem…
user3078335
  • 781
  • 4
  • 13
  • 24
0
votes
1 answer

Replacement by synsets in Python pattern packatge

My goal is to create a system that will be able to take any random text, extract sentences, remove punctuations, and then, on the bare sentence (one of them), to randomly replace NN or VB tagged words with their meronym, holonym or synonim as well…
Fedja Blagojevic
  • 813
  • 1
  • 10
  • 18
0
votes
1 answer

Create wordforms using python

How can I get different word forms using Python. I want to create a list like the following. Work=['Work','Working','Works'] My code: raw = nltk.clean_html(html) cleaned = re.sub(r'& ?(ld|rd)quo ?[;\]]', '\"', raw) tokens =…
Raghav Shaligram
  • 309
  • 4
  • 11
0
votes
0 answers

Stemming, lemmatization in python

I have checked all the other trails and used few of the solutions. I am facing a challenge in using port stemmer. I am trying to eliminate the affixs however port stemmer reduces the words into some weird forms like languages becomes languag and…
Raghav Shaligram
  • 309
  • 4
  • 11
0
votes
1 answer

Can't use NLTK on text pulled from the Silmarillion

I'm trying to use Tolkein's Silmarillion as a practice text for learning some NLP with nltk. I am having trouble getting started because I'm running into text encoding issues. I'm using the TextBlob wrapper (https://github.com/sloria/TextBlob)…
Travis Leleu
  • 4,190
  • 2
  • 27
  • 33
-1
votes
1 answer

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 Translator from tkinter.ttk import * import…
1 2 3
22
23