In a previous article, I conducted an in-depth analysis of all past US presidential inaugurations. After watching newly elected President Biden's inaugural address, I was curious what a sentiment analysis would show. Would I agree with the results of a computer algorithm?
I utilized Microsoft's Cognitive Services for this analysis. It is an API based cloud based service. I chunked the speech into sentences and fed it into the service. The service returns several attributes to classify the sentence as positive, negative or neutral. There are scores for each of these buckets as well. I loaded the results into a database and used Tableau to visualize the findings.
Most Sentences Were Neutral
Below is a sample of some of the neutral sentiments. The algorithm was very accurate with these. Sentences such as "This is America's Day" and "This is democracy's day" I would argue should be considered positive. As a human I can detect that these were meant to be positive. But how did I come to that conclusion? I knew that the President was referring to recent attacks on the US capitol. but the algorithm doesn't know that. That is definitely a limitation of the algorithm but maybe a limitation impossible for a machine to overcome.
A Once-in-a-Century Virus Silently Stalks The Country
I agree with most of the sentences classified as negative such as "Millions of jobs have been lost" and "A once-in-a-century virus silently stalks the country". There are also examples where the algorithm was lacking. Sentences such as "We can deliver racial justice" should be positive. Likely the word racial is mostly used in negative contexts. Also "We can overcome the deadly virus" should be positive. But the algorithm likely sees the word "deadly" and figures, this can't be good!
Positive Sentiments To Go Please
By plotting the sentiments in time sequence as they were delivered, you can see a big wave of positive sentiments that concluded the speech.
I was pleased with the results of the positive sentiment analysis. I agree with most of what the algorithm decided. Here is a sample below.
President Biden Compared To Recent Presidents
Biden didn't rank favorably to recent presidents based on the percentage of the sentiments.
However, if you look at the raw counts of sentences (not by percentage as the previous chart does) it tells a slightly different story. Here you can see President Biden delivered more positive remarks then all recent Presidents other than President Obama. However, the same holds true for the negative sentences he delivered. Another distinction: the sentiment analysis takes every sentence independently. As you can see, Biden delivered a lot more sentences than others, especially the Republican Presidents Trump and George W Bush. Although the word counts were not substantially different from other recent presidents, the number of words per sentence was. In other words, Biden had a lot of sentences with not so many words.
Try it Out Yourself - Interact With Dashboard
Kick the tires and have fun filtering and exploring on your own. You can also read all of the inaugural addresses right here.