Sentiment Analysis using NLP with Python

Anomita Chandra
9 min readNov 24, 2020
Photo by Chris J. Davis on Unsplash

Sentiment Analysis is a sub-field of Natural Language Processing. It is used to analyze or extract the true underlying meaning from texts, which can be anything from reviews to surveys and from customer feedbacks to tweets. Majorly, it classifies the text into positive, negative, or neutral sentiments.

For examples, if a customer writes a review for a particular product on Amazon, “Product received is not the Black Logo design pictured on the website. Unfortunately received the White Logo on Black cap instead which I definitely didn’t order from the seller.” A sentiment analysis model would correctly determine it is negative.

Sentiment analysis boosts business in many ways, by able to know which of their products are doing well in the market, what are the customer reviews or feedback for their services. Finding out customer sentiments for the company’s products helps to focus on the aspects which streamline growth of the company.

In this article I am going to show you data pre-processing and cleaning, visualize WordClouds using masking, and eventually build supervised learning models using social media data (tweets) to determine whether the tweet falls into positive or negative sentiment. For this article I have taken the dataset from Analytics Vidhya. This data set contains three columns — id, label — 0 or 1 to indicate…

--

--

Anomita Chandra

An aspiring Data Science and Machine Learning enthusiast | Master's student |