From the course: Natural Language Processing in Python

Unlock this course with a free trial

Join today to access over 26,400 courses taught by industry experts.

Sentiment analysis in Python

Sentiment analysis in Python

“

Now that you understand how sentiment analysis works, let's code it up in Python. For sentiment analysis specifically, it can be done using a variety of approaches. It can be done using rules-based techniques, classification techniques, or modern NLP techniques. In this demo, we're specifically going to be walking through the Vader library. Vader stands for Valence Aware Dictionary and Sentiment Reasoner. And this library works especially well on informal text. So things like social media text or online reviews. This is one of the many sentiment analysis libraries that are out there. So based on what type of text you're doing sentiment analysis on, you can choose an appropriate library to work better on your type of text data. Now the general workflow for how to do sentiment analysis in all these libraries is pretty similar. So once you see how this is done in Vader, you're going to be able to do this on your own as well with other libraries. So here's what the code for Vader will…

Contents