The State of the Union is one of the few times in any given year when most people hear a public speech, much less read think pieces and rhetorical criticism about a speech. The contemporary “state of the union” address is a century old—meaning the presidential tradition of delivering what might be an epideictic (praise and blame) speech is a key part of what we’ve come to expect from the office.

When I listened to this year’s speech, I was struck by the emotional whipsaw of it. The highest possible highs trading off with the lowest lows. This seemed quite different from past addresses I have written about.

The general format of the State of the Union address involves the president being introduced by the Speaker of the House (Trump chose to launch right in this year—procedural style be gone), followed by a list of highlights and something like the phrase “the state of our union is strong.” This phrase is a cornerstone of any of these addresses, much like any Spider-Man film will include someone saying “with great power comes great responsibility.” The middle of the speech is usually a boring list of policy priorities. My prior research suggests that the middle of the speech is intentionally boring to lead into a positive ending.

This year’s State of the Union, however, violated my expectations in some surprising ways (e.g., the reproductive rights section of the speech). Using some fairly basic methods in sentiment analysis, I’ve created a rhetorical critique of the speech. Sentiment analysis is a form of emotion A.I. that uses text analysis and language processing to assess the affect of subjective information. It can be used with any kind of text, and is often used in marketing and customer service in relation to survey responses and online posts, but it provides an interesting look at the rhetoric and language used in speeches as well. The code I used to build this project, and the base CSV needed to reproduce it, are available on Github.

I am not interested in facts so much as style here. Facts are useful and important, but they miss the real power of the epideictic address to assign praise and blame. Line by line debate is ineffective in these cases because affect always wins out over argument in speeches. It just doesn’t matter how fast or how strong the facts are.


Frequency on the left, mixed sentiment methods afinn (for score) and nrc (for sentiment) on the right.

The first step in analyzing Trump’s State of the Union is to look at the words he used and their frequency. From the assessment above, we can see that the president gravitates toward a handful of terms, especially those that indicate identity (“American,” “united,” “Americans,” “America”). It’s striking that “women” ranks so high on this list. The energetic response to the president’s use of this word caused a bit of a stir and was unpredictable, which I would guess is a good thing. When sentiments, or emotions, are attached to certain words we can map out an analysis of those emotions in relation to the words commonly associated with them. The word-level sentiment analysis on the right (above) is nearly impossible to read with dots for a range of emotions overlapping each other throughout.

Density of sentiment rather than dots.

If the sentiments are mapped out as density, rather than dots, we begin to see the speech’s structure. The beginning of the speech is a wave of platitudes, followed by a deep core of negative feelings (fear and disgust) centered around the 2,000-word mark, the heart of Trump’s appeal for a border wall. The ending sections of the speech—celebrating World War II and children—are much more positive, and according to the analysis, they communicate trust.

Restricted for five clear feelings.

Limiting the number of sentiments included in the graph makes things clearer. Here, we see that the words used in the center of the speech are clearly rooted in anger, disgust, and fear. We also see the message of joy, hope, and trust at the end. Still, it appears that many negative words persist until the speech’s conclusion.

An important caveat here is that I did not restrict bi-grams (pairs of words) that use negation terminology (“not [angry word]”) from this analysis. Perhaps this is muddying the data, but that would assume that the president has a speaking style like John F. Kennedy or Barack Obama, which he does not. Trump’s poetics are direct. He tells you what he is going to tell you with strong words.

With some faceting so you can see the regions of feeling side by side.

In the visualization above, we see exactly where each sentiment is densest —where the feeling should be the strongest.

I is the sentence number. The clustering is clear.

In the clusters here from before, you can see the effusive words near the beginning and their co-presence with negative words. The core of fear and disgust has little positivity associated with it. What’s striking, however, is how many positive and negative words appear at the same time—as if in the same sentences.

If we start to read for signal and noise, the combined positive and negative affects appear to cancel each other out. Where do we find the clearest signal? In the heart of the argument about the border wall and the love of cancer-surviving children.

The region related to disgust, anger, and fear has the least deviation.

If we start to consider that the sentences themselves could be scored for their standard deviation and their mean sentiment score (above), the picture becomes even clearer. There are many strange sentences in the speech. They appear to have a mixed valence, which is aligned with the mixed affect of the speech in general. Using the tabular data, the most conflicted sentences include:

accountability, so we can finally terminate those who mistreat our wonderful veterans. [applause] and just weeks ago, all parties united for groundbreaking criminal justice reform.
this powerful barrier almost completely ended illegal crossings.

Most likely, this is simply Trump’s style: a collision of differing sentiments and intensities. The sentences at the core of the fearful, angry section of Trump’s speech, however, have low standard deviations. For a second, the message is clear.


A number of commentators on Twitter referred to the speech as “gaslighting,” a term referring to phenomenon where someone is manipulated into feeling crazy. It’s a tactic common in abusive relationships. Be presidential and unpresidential at the same time. Be viciously partisan while calling for unity. Literally claim to be doing the exact opposite of what you are doing.

Some might say this is Trump’s genius, a skill for creating so much emotional noise that he can control the signal by making all the complex feelings weird and uncomfortable. Instead, I would suggest that we follow Nassim Taleb’s idea of anti-fragility: There are some sides in arguments—some things and factions—that thrive on the disruption of order. This is in direct opposition to the assumptions of stasis and continuity we so commonly make in everyday thinking. Although we might believe that love, hope, and joy are the most likely sentiments to cut through noise, it appears that fear is far more effective.

At one point (around paragraph 54 in the speech) things almost became too positive—which is when the abortion canard appears almost mid-sentence. Philosopher Alenka Zupancic has theorized that so-called “deactivated enjoyment” is a powerful form for maintaining the soft nihilism of the status quo. In other words, the goods are always spiked with bad.

At heart, Trump’s State of the Union was a campaign speech. Trump was telling the story of a dangerous, disgusting other who must be stopped by masculine heroes. Everything else, from the Family and Medical Leave Act to space lasers, was just noise.

The sentiment analysis can provide a way of glimpsing the dynamics of the speech and how they operate. In this sense, Stacey Abrams’ Democratic rebuttal was perfect. You can’t answer Trump with Trump; you answer him by establishing a real emotional connection and making a few clear arguments. The real argument to be had is about the gravity well of negative energy in the middle of the plot, not the details of the factsheets around the zero affect line.

In this year’s State of the Union address, America watched one speaker deliver two speeches: one positive, the other deeply negative. The result is an erratic whipsaw of emotions, leaving listeners inspired but also fearful — and most of all, confused.


I’d be remiss without sharing a few caveats about this dissection of the speech.

First, I want to be careful to note here that sentiment analyses like these are not semantically intelligent. The computer is just counting words, not considering them in context.

Second, sentiment analysis tends to be overrated and the method can introduce slight errors. A sentiment analysis project is only as good as its source material. I used the transcript from Vox; an official White House script might have been better. But the human patterns of speech encoded in this text feel more meaningful. Of course, computers cannot simply read the emotion of a text as well. I am relying on established sentiment lexicons (afinn and nrc) and a generic set of stop words.