New software - 'sentiment analysis' - that can automatically determine how someone feels based on what they write or say on Twitter, has been developed by researchers led by one of Indian-origin.
Based on the number of positive tweets posted toward each party, the computer model predicts that Hillary Clinton -- Democratic Party nominee for President of the US in the 2016 election -- will win the election. Republicans sent out 17 per cent more political tweets than Democrats.
Delaware was the only state in which a majority of tweets from all counties in the state were positive toward the same party -- in this case, the Democrats. For the Republicans, South Dakota had the highest percentage of counties in which most of their tweets were positive toward the party (73 per cent of the counties), the study suggested.
The biggest surge of positive tweets for Republicans was during the Republican National Convention on June 18 and when the video of Donald Trump boasting about groping women.
The largest surge of positive tweets for Democrats was after the last two presidential debates and after the New York Times published its story October 1 that Donald Trump -- Republican Party nominee for President of the US in the 2016 election -- avoided paying federal taxes for nearly two decades.
"The sentiment analysis will try to predict the emotions behind every human being when he or she is talking or writing something," said Debjyoti Paul, researcher at the University of Utah, in the US, in a statement.
"With that in mind, we are not just trying to look at the information in the tweets. We are trying to incorporate the emotion with the information," Paul added.
To test out the accuracy of this software's machine-learning model, the team used it to analyse the individual sentiments of more than 1.6 million (and counting) geo-tagged tweets about the US presidential election over the last five months.
The team compared its results to the New York Times Upshot election forecast website and found the state-by-state analysis was very similar.