0

For a sentiment analysis project, I'm trying to add stopwords while using TextBlob. I've tried to combine NTLK scripts as well with no luck. Here is my code prior to attempting to add the stopwords.

import csv
from textblob import TextBlob

infile = 'File Path'

with open(infile, 'r') as csvfile:
    rows = csv.reader(csvfile)
    for row in rows:
        sentence = row[0]
        blob = TextBlob(sentence)        
        print (blob.sentiment_assessments)

1 Answers1

0

Possible duplicate of Adding words to nltk stoplist

However, if it was a typo and you actually wanted to remove the stopwords, still a possible duplicate of Stopword removal with NLTK and Removing stopwords from a textblob Moreover, you should look into the following issue mentioned under the issues sections of the developer of textblob: https://github.com/sloria/TextBlob/issues/153

But, if still it's not clear to you, please elaborate the exact issue with sample code.

MrRaghav
  • 335
  • 3
  • 11