Skip to main content

Trump Tweets: A Text Sentiment Analysis

  • Chapter
  • First Online:
Trump, Twitter, and the American Democracy

Part of the book series: The Evolving American Presidency ((EAP))

Abstract

Following the analyses of the volume and the topics of Trump’s tweets in Chap. 3, this chapter examines the rhetoric of his tweets. Because media coverage of Trump’s tweets tends to focus on the most shocking and negative of his tweets, those selected tweets do not represent the total breadth of his language on Twitter. We find that, in the aggregate, Trump’s tweets are neither positive nor negative. Instead, they are neutral in tone. Moreover, we find that the extent to which Trump uses negative rhetoric (as opposed to more positive ones) changes over time. In addition, we also examine how tweet sentiment affects the number of retweets that Trump receives. We find that the more negative the tweet, the more retweets it receives. That is, to the extent that Trump uses his first mover advantage, behaves as a strategic communicator, and seeks greater attention on Twitter, he goes negative.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 64.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Trump, Donald J. “Twitter/@realDonaldTrump: Wow, @CNN got caught fixing their “focus group” in order to make Crooked Hillary look better. Really pathetic and totally dishonest!” October 10, 2016, 12:31 PM. https://twitter.com/realDonaldTrump/status/785563318652178432

  2. 2.

    Trump, Donald J. “Twitter/@realDonaldTrump: Despite winning the second debate in a landslide (every poll), it is hard to do well when Paul Ryan and others give zero support!” October 11, 2016, 5:16 AM. https://twitter.com/realDonaldTrump/status/785816454042124288

  3. 3.

    Trump, Donald J. “Twitter/@realDonaldTrump: Never has the press been more inaccurate, unfair or corrupt! We are not fighting the Democrats, they are easy, we are fighting the seriously dishonest and unhinged Lamestream Media. They have gone totally CRAZY. MAKE AMERICA GREAT AGAIN!” August 10, 2019, 5:07 AM. https://twitter.com/realDonaldTrump/status/1160160760179372032

  4. 4.

    In comparison, a typical Trump tweet since he has taken office receives about 18,000 retweets.

  5. 5.

    Please see the Appendix in this chapter for additional details on our approach to measuring tweet sentiment.

  6. 6.

    Trump, Donald J. “Twitter/@realDonaldTrump: I am truly honored and grateful for receiving SO much support from our American heroes …” September 16, 2016, 10:58 AM. https://twitter.com/realDonaldTrump/status/776842647294009344

  7. 7.

    Trump, Donald J. “Twitter/@realDonaldTrump: My supporters are the smartest, strongest, most hard working and most loyal that we have seen in our countries history. It is a beautiful thing to watch as we win elections and gather support from all over the country. As we get stronger, so does our country. Best numbers ever!” June 16, 2018, 6:12 AM. https://twitter.com/realDonaldTrump/status/1007974129474121728

  8. 8.

    Trump, Donald J. “Twitter/@realDonaldTrump: Wow, @CNN got caught fixing their “focus group” in order to make Crooked Hillary look better. Really pathetic and totally dishonest!” October 10, 2016, 12:31 PM. https://twitter.com/realDonaldTrump/status/785563318652178432

  9. 9.

    While the intraclass correlation coefficients (ICC) for all models in the Table 4.3 are low, the plot of the varying intercepts suggests that a multilevel approach is appropriate (Fig. 4.12 in Appendix). Nezlek (2008) recommends that, instead of relying on the ICC as the indicator of whether multilevel modeling is necessary, it is preferable to consider the nature of the data and the data structure. In the case here, our data is longitudinal and using months as the Level-2 grouping variable is appropriate.

References

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yu Ouyang .

Appendix

Appendix

Calculating Tweet Sentiment

Sentiment analysis is a common approach in analyzing text data (see, for instance, Aldahawi and Allen 2013; Bae and Lee 2012; Giachanou and Crestani 2016). However, many common methods for conducting sentiment analysis are rudimentary, using only counts of words to calculate a final composite score. Consider the following sentence: “The economy is not doing very good.” Due to the presence of the word “good” in this sentence, many sentiment analysis algorithms would classify this sentence as positive, while the actual meaning of the sentence is anything but. Specifically, we account for valence shifters in texts. Valence shifters are words that modify the meanings of surrounding words. For instance, Rinker (2019) notes that

a negator flips the sign of a polarized word (e.g., “I do not like it.”). An amplifier (intensifier) increases the impact of a polarized word (e.g., “I really like it.”). A de-amplifier (downtoner) reduces the impact of a polarized word (e.g., “I hardly like it.”). An adversative conjunction overrules the previous clause containing a polarized word (e.g., “I like it but it’s not worth it.”).

Because valence shifting words occur regularly in verbal and written communications, and that they shift the meaning (i.e., the polarity) of the words around it, it is important to account for such words when applying sentiment analysis algorithms to textual data. To examine Trump’s tweets via sentiment analysis, while accounting for valence shifters, we use the sentimentr package in R. For each tweet, we split the texts into sentences, calculate the polarity of each sentence, and then construct an average score for the text polarity of each tweet.

We calculate three measures of tweet sentiment. Each individual word can either convey positive sentiment, convey negative sentiment , or be neutral in meaning. Using the text polarity of all of the words in the tweet, the first measure utilizes the standard method for calculate the average sentiment in each tweet. The second measure of tweet sentiment downweights the zero values in the averaging, that is, the neutral words are downweighted to avoid biasing the measure to zero. Finally, the third measure upweights negative words. This approach is appropriate if the speaker is likely to surround negative words with positive words in the same text. This mixture of negative and positive words is likely if the speaker tries to follow polite social convention, but the overall intent of the message is negative.

Since sentimentr employs a dictionary-based approach to calculating sentiment, to further ensure the robustness of the tweet sentiment measure, we use several different dictionaries to calculate tweet sentiment: (1) augmented list of Hu and Liu’s (2004) positive and negative words; (2) modified version of Jockers’s (2017) sentiment lookup table; (3) combined and augmented version of Hu and Liu (2004) and Jockers (2017); (4) filtered version of Mohammad and Turney’s (2010) positive/negative word list; (5) augmented version of Cambria et al.’s (2016) word list; (6) augmented version of Baccianella, Esuli, and Sebastiani’s (2010) list of positive and negative words; (7) filtered version of Wu, Morstatter, and Liu’s (2016) list of positive and negative slang words; and (8) version of Taboada et al.’s (2011) positive/negative word list. As the results of the measure of tweet sentiment using different dictionaries are similar, we elect to use version using the combined and augmented version of Hu and Liu (2004) and Jockers (2017), as it is the default and recommended dictionary in sentimentr based on performance evaluation. Our own evaluation shows that this dictionary does a good job in assessing the tone of Donald Trump’s tweets (see Table 4.1 and associated discussions). For more technical details on the exact mathematical algorithm used for each of the three approaches to measuring tweet sentiments, please see online documentation for the sentimentr package (Version 2.7.1): https://github.com/trinker/sentimentr.

Three Measures of Tweet Sentiment

As shown in Fig. 4.11, the measures of tweet sentiment generated from three separate approaches are very similar. The one notable difference is that the measure that upweights negative words in the algorithm has a slight tail to the left, denoting that some tweets are exceptionally negative. In addition, the three measures of tweet sentiment display high levels of correlation (shown in Table 4.7).

Fig. 4.11
figure 11

Three measures of tweet sentiment. This figure presents the distribution of the three measures of tweet sentiment. Measure in Figure (a) uses the standard method for calculating the average sentiment in each tweet. Figure (b) shows the distribution of the measure of tweet sentiment that downweights the zero values in the averaging. Figure (c) presents the distribution of the measure of tweet sentiment that upweights negative words. For ease of presentation and comparison with the other measures of tweet sentiment, Figure (c) shows only those tweets with a tweet sentiment score of -2 or greater, thus excluding 19 tweets from the full dataset

Table 4.7 Correlation coefficients—measures of tweet sentiment

Explaining Tweet Sentiment: Addendum

Fig. 4.12
figure 12

Varying intercepts (sorted). This figure presents the varying intercepts from Model 7 in Table 4.3, sorted from least to greatest. Vertical reference line at zero. As shown, there is considerable variations in the month-to-month average sentiment in Trump’s tweets. Thus, a multilevel approach to modeling is appropriate

Explaining Retweets: Addendum

Table 4.8 Explaining number of retweets

Rights and permissions

Reprints and permissions

Copyright information

© 2020 The Author(s)

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Ouyang, Y., Waterman, R.W. (2020). Trump Tweets: A Text Sentiment Analysis. In: Trump, Twitter, and the American Democracy. The Evolving American Presidency. Palgrave Macmillan, Cham. https://doi.org/10.1007/978-3-030-44242-2_4

Download citation

Publish with us

Policies and ethics