Sentiment Analysis

Even though the last exercise was a little taxing, I wanted to take another shot at a small project-based approach for this week too. So the mini project I decided for myself was a sentiment analyser. 

Nowadays companies want to understand, what went wrong with their latest products? What users and the general public think about the latest feature? All this information can be quantified with reasonable accuracy using sentiment analysis.

Quantifying users content, idea, belief, and opinion is known as sentiment analysis. User's online post, blogs, tweets, feedback of product helps business people to the target audience and innovate in products and services. Sentiment analysis helps in understanding people in a better and more accurate way. It is not only limited to marketing, but it can also be utilized in politics, research, and security. Sentiment Analysis is also referred to as Opinion Mining. It’s mostly used in social media and customer reviews data.

There are mainly two approaches for performing sentiment analysis.
  • Lexicon-based: count number of positive and negative words in given text and the larger count will be the sentiment of text.
  • Machine learning based approach: Develop a classification model, which is trained using the pre-labelled dataset of positive, negative, and neutral.
For this, I will use the NLTK’s twitter_samples corpus as the labelled training data. The twitter_samples corpus contains 2K movie reviews with sentiment polarity classification. 
 
I will make two categories for classification. They are: positive and negative. The twitter_samples corpus already has the tweets categorized as positive and negative, so that helps too. And in the end, evaluate the results using a confusion matrix. 

This will probably be the last exercise for this module - for this semester, but I plan on continuing this over the December break to make my own chatbot. 

Comments

Popular posts from this blog

Finally built a text classifier - Part 1

Linear Regression Theory