NLP with Python and TextBlob

Photo by fabio on Unsplash

Do you think doing NLP is difficult? then you don’t know TextBlob!

from textblob import TextBlob

# Get the sentiment of a phrase

sentiment = TextBlob(“I love my life”).sentiment

print(sentiment)

Finished! You will now have an object that contains the data relating to positivity/negativity and how subjective/objective your sentences are.

In the complete code on codelab you can also test a practical approach related to the use of even basic techniques of NLP.

Natural Language Processing

Made with Love by Antonio Scapellato