What is sentiment analysis?

Sentiment analysis using python

Sentiment analysis comes under NLP(Natural language processing) which is a sub branch of AI. It is used to measure the positivity, negativity or neutrality of a sentence, paragraph or a document.

How it does the measurement? 

Here in the example we will be using a package called textblob in python to do this job. This package will be having a pre-trained classifier trained on movie reviews corpus.
In the movie review corpus, there will be a huge set of positive movie reviews (good movie reviews), negative movie reviews (bad movie reviews) and neutral movie reviews. So the classifier can efficiently identify and measure the positivity, negativity or neutrality of a given sentence. 

Where is it useful?

There is no point in learning something new unless we don't know where it can be used. Application of sentiment analysis is plenty. Some of them are listed below,
  1. Customer feed back analytics.
  2. Measuring the rudeness in a letter.
  3. Chatbot.
  4. Business analytics.
  5. Social media analytics.
Anywhere where there is a large amount of textual data we can do sentiment analysis and get a report out of it.

Sample Code and output:

In the above example -ve value means a negative sentiment, +ve value means a positive sentiment and 0.0 is neutral.

Thank you..­čśÄ


Post a Comment

Popular Posts