Analyzing the tone of Trump's speeches
Standard sentiment analysis scores a document on a positive-vs-negative scale. Using the Emotional Lexicon, though, you can add unique emotional measurements like anger, joy, surprise, or fear.
text analysis emotional lexicon natural language processing
Readings and links
- Trump Sounds a Different Tone in First Address to Congress
- NRC Emotional Lexicon, the words-emotions database that was used for the analysis
Summary
Using a dataset of words marked with different emotions (anger, surprise, happiness, etc), The UpShot compared the emotional tone of Trump's campaign speeches, his 2017 address to Congress, and previous presidents' State of the Union addresses.
While I'm happy to claim that sentiment analysis is a generally problematic technique, this piece is super fun to reproduce as well as provides an interesting launchpad for critique of emotional analysis of text. Leaning on academic work as a beacon of truth might be a tempting thought, but it should receive just as much critique as any other source.
Warning: you're (hopefully) going to be completely conflicted after this analysis. It's super flawed but super fun, and somehow despite the flaws it seems to work perfectly.
Notebooks, Assignments, and Walkthroughs
An introduction to the NRC Emotional Lexicon
As described by its creator, the "NRC Emotion Lexicon is a list of English words and their associations with eight basic emotions (anger, fear, anticipation, trust, surprise, sadness, joy, and disgust) and two sentiments (negative and positive)." This notebook examines what the dataset looks like and a few ways of manipulating it.
Reproducing The UpShot's Trump State of the Union visualization
After combining several datasets of speeches - both by Trump and previous presidents - we'll be able to reproduce the main graphic from The UpShot's piece.