Natural language processing (NLP) is a subfield of computer science that analyzes the use of human languages in texts.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeV9cZwNqSG5PN3mOvD-jmIusLv2XfbdAz_yLt_SZKI9CDszEnz0lLZXootwL8196qZtngUM-stt5blMbInKhtjNvKaGQysRPPgQHM14F0qM1NJnE1eS7DK2GF7Tetre-hhHssuvICHw/w625-h466/ProTrumpEmojis.png)
Common questions asked in NLP analysis (ex. a set of tweets):
- What are the 100 most common words and what contexts are they used in?
- What sentiments do these words convey (positive, negative, litigious, angry, happy, sad, etc.)?
- Can a set of tweets be separated into several "buckets" (ex. #Election2020 tweets divided into pro-Trump, neutral, and pro-Biden perspectives)?
I've examined these sorts of questions before, but only recently did I learn there is an entire field dedicated to "emoji NLP" (or "emoji data science"). Including emojis in an analysis of a set of tweets certainly makes sense -- Twitter users skew young, and use lots of them!
While English language words usually have clear-cut meanings that one can look up in a dictionary, my experience leads me to believe emojis don't always have intrinsic meanings.
Exercise: Define the emoji
in just a few words.
Here's just a few ways people use the emoji (per Dictionary.com):
- "you’ve had a few too many, or many too many";
- "the user is tired, overly emotional, or plain confused";
- "the dumb face men make when they try to look sexy in a photo."
Analyzing the use of emojis on a large scale, then, is a unique challenge that I couldn't resist tackling.
Most of my NLP work has focused on Trump's tweets and responses to his tweets, and my last post on this platform outlined a machine learning algorithm that classifies replies into pro-Trump or anti-Trump buckets. Naturally, my first question about emojis was What emojis do pro-Trump individuals use, and what emojis do anti-Trump individuals use?
Here are the top emojis used in pro-Trump replies to @realDonaldTrump:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeV9cZwNqSG5PN3mOvD-jmIusLv2XfbdAz_yLt_SZKI9CDszEnz0lLZXootwL8196qZtngUM-stt5blMbInKhtjNvKaGQysRPPgQHM14F0qM1NJnE1eS7DK2GF7Tetre-hhHssuvICHw/w625-h466/ProTrumpEmojis.png)
Luckily, it doesn't take a semiotician to understand what most of these emojis mean. Close to 30% of the emojis in pro-Trump tweets are the U.S. flag, unsurprising given the patriotism that Trump inspires in his supporters. The heart, clapping, and thumbs-up emojis as directed to Trump clearly indicate approval of Trump's tweets or general performance as president, and the green check mark emoji reflects pride in Trump's accomplishments. (Trump supporters, please let me know why you're using so many black box emojis.)
What about anti-Trump replies?
I maintained the Y-axis scale in this graphic to help visualize one key observation: unlike Trump supporters, anti-Trump users do not use one emoji much more than any other. Specifically, while supporters use the American flag 28.9% of the time, anti-Trump accounts use the emoji almost three times less often -- 10.8% of the time. A few of the emojis that are unique to anti-Trump tweets: the Pinocchio emoji (Trump lies???), the angry emoji, and the rolling eyes emoji -- all of which again have easily interpretable meanings.
How about Trump's own tweets? Does Trump even know what an emoji is? Apparently! (Or at least his staff does.) Here are the most common emojis in Trump's tweets, dating from his first-ever tweet in May 2009:
This blog post writes itself. It's not difficult to spot Trump's favorite emoji -- the American flag! 33.2% of the emojis used in Trump tweets are U.S. flags, comparable to the frequency in pro-Trump replies (28.9%) and much higher than the frequency in anti-Trump replies (10.8%). Again, this result makes sense given Trump's view that America must be held above every other nation (and of course given his role as president of the United States). The siren emoji likely reflects Trump's use of Twitter to make major announcements -- such as judicial nominations or executive orders. (Side note: Why does the pointing down emoji [#10] have to be the white one when he could've used a neutral skin tone???)
That's it for now, but of course this post just barely touches upon emoji NLP and its application to the Trump Twitterverse (how can we group emojis based on sentiment and make conclusions about pro-Trump and anti-Trump tweets? Can we capture irony in the use of emojis on Twitter? Are certain emojis associated with tweets that receive more likes or retweets?) -- and more will come on this topic and beyond.
I'd like to thank Hadley Wickham for his emo R package, Michael W. Kearney for his package rtweet, Hamdan Azhar for his emoji data science tutorial, and Emil Hvitfeldt for his ggplot2 emojis tutorial.
Comments
Post a Comment