What do NaMo’s speeches convey?
This weekend while wandering around the labyrinths of internet, I stumbled upon the corpus of Indian prime minister Mr. Narendra Modi’s speeches. I thought it would be interesting to analyse the speeches to see what are the main issues he speaks about and what is the overall connotation of the speeches. In this blog, I present my analysis of the speeches along with the visualizations in the form of graphs and plots.
Unigram and Bigram Frequency
I used count vectoriser from sklearn feature extraction to vectorise the text into frequency vectors and then summed it over the rows to find the frequency of each word in the overall corpus. Later I plotted the top 30 words by frequency on a barplot to analyse them. Following is the result I got:
Since mann ki baat is a program aimed at listening to and addressing problems of people PMs main focus is on issues relating to poverty and water. Also he talks about taking actions by using phrases like time, make, great.
Most Frequent Nouns, Adjective and Verbs
Next up I thought it would be interesting to do POS tagging of each speech to see what are the major issues PM lays stress upon and how positive/willing he is to solve them. For this I pos tagged the whole corpus using nltk and then found out the most common nouns, verbs and adjectives out of it. I plotted 16 most common nouns, adjectives and verbs in the form a word cloud to visualise and draw inferences. Here is what I got:
It is clear from the word cloud that the main issues that are being highlighted are related to basic amenities like water, villages, farmers. Interestingly enough, yoga is repeatedly a frequent part of the conversation. PM has also addressed issues about black money but the frequency is on the lower side.
The verbs mostly have a positive connotation. Words like think, make, started and done indicate the action oriented approach.
Adjectives do reveal a basic essence of the major fields/issues that PM is targetting. Youth, poor and digital India initiatives are some of the most frequent areas touched upon.
Sentiment Analysis Of The Speeches
Next up I analysed each speech for it’s sentiment score to understand whether the connotation is positive/negative and how it has changed overtime. I use TextBlob library to sentiment score each speech. Here is how the time series sentiment score looks like:
Looking at the overall analysis, the speeches don’t seem to be that positive. This might be because they are aimed at addressing the issues people face on daily basis. Overall years 2015 and 2016 are more positive as compared to the other years.