How to make Sentiment Analysis usingTextBlob in Python

PHOTO EMBED

Sun Jun 16 2024 14:48:18 GMT+0000 (Coordinated Universal Time)

Saved by @freepythoncode ##python #coding #python #programming #nlp

from textblob import TextBlob

text = 'how are you'

blob = TextBlob(text)

if blob.polarity > 0:
    print('Positive')
elif blob.polarity < 0:
    print('Negative')
else:
    print('Neutral')
content_copyCOPY