An analysis of the emotions being expressed on social media indicates that the upcoming U.S. presidential election may be a much closer contest than many commentators and pollsters believe.
That’s the conclusion of Expert.ai, a company with offices in Modena, Italy, and Rockville, Maryland, that uses an A.I. technique called “sentiment analysis” to understand the emotions being expressed in social media posts.
The company’s analysis puts Democratic candidate Joseph Biden ahead of President Donald Trump, 50.2% to 47.3%, a margin that is much narrower than the double-digit lead that Biden has over Trump in most national opinion polls.
Based on these polls, many political analysts and commentators are expecting that Biden may win a historic landslide. But Expert.ai’s A.I.-based analysis indicates the race may be much tighter than these human experts are expecting.
Expert.ai’s political forecasting model was successful in predicting that the U.K. would vote to leave the European Union in 2016. And academic research has shown that similar social media sentiment analysis would have better predicted Trump’s victory in the 2016 U.S. presidential election than polling data.
Trump was the focus of far more social media activity than Biden, accounting for almost 60% of all the posts Expert.ai analyzed, compared to slightly less than 17% for Biden. But Biden ranked higher in terms of positive emotions such as “success” and “hope,” while Trump scored higher on negative emotions such as “fear” and “hatred.”
The only positive emotion on which Trump scores better than Biden, according to a statement from Expert.ai, is “action.”
Expert.ai’s system looked at 500,000 Twitter posts and other social media comments made over the past week. It uses natural language processing, a form of A.I. that can understand aspects of language, to categorize the sentiment being expressed in these social media posts according to 84 different emotional labels.
These labels are then given a rank in terms of their intensity, on a scale from 1 to 100, and are multiplied by the number of occurrences for each candidate. The emotions are also classified as either “positive” or “negative” and used to create an index that can compare the two candidates against one another.
More politics coverage from Fortune:
This story was originally featured on Fortune.com