Improving Sentiment Analysis in Election-Based Conversations on Twitter with ElecBERT Language Model
Source abstract
Abstract
Sentiment analysis plays a vital role in understanding public opinions and sentiments toward various topics. In recent years, the rise of social media platforms (SMPs) has provided a rich source of data for analyzing public opinions, particularly in the context of election-related conversations. Nevertheless, sentiment analysis of election-related tweets presents unique challenges due to the complex language used, including figurative expressions, sarcasm, and the spread of misinformation. To address these challenges, this paper proposes Election-focused Bidirectional Encoder Representations from Transformers (ElecBERT), a new model for sentiment analysis in the context of election-related tweets. Election-related tweets pose unique challenges for sentiment analysis due to their complex language, sarcasm, and misinformation. ElecBERT is based on the Bidirectional Encoder Representations from Transformers (BERT) language model and is fine-tuned on two datasets: Election-Related Sentiment-Annotated Tweets (ElecSent)-Multi-Languages, containing 5.31 million labeled tweets in multiple languages, and ElecSent-English, containing 4.75 million labeled tweets in English. The model outperforms other machine learning models such as Support Vector Machines (SVM), Naïve Bayes (NB), and eXtreme Gradient Boosting (XGBoost), with an accuracy of 0.9905 and F1-score of 0.9816 on ElecSent-Multi-Languages, and an accuracy of 0.9930 and F1-score of 0.9899 on ElecSent-English. The performance of different models was compared using the 2020 United States (US) Presidential Election as a case study. The ElecBERT-English and ElecBERT-Multi-Languages models outperformed BERTweet, with the ElecBERT-English model achieving a Mean Absolute Error (MAE) of 6.13. This paper presents a valuable contribution to sentiment analysis in the context of election-related tweets, with potential applications in political analysis, social media management, and policymaking.
Source: openalex_inverted_index · Quality: baseline
Research context
OpenAlex topics: Sentiment Analysis and Opinion Mining · Hate Speech and Cyberbullying Detection · Social Media and Politics
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
References (48)
Show source-provided references
1. 280 characters to the White House: Predicting 2020 U.S. presidential elections from Twitter data10.1007/s10588-023-09376-5 ↗
2. Prediction and analysis of Moroccan elections using sentiment analysis10.1007/978-3-030-90618-4_30 ↗
3. The emergence of social media data and sentiment analysis in election prediction10.1007/s12652-020-02423-y ↗
4. Crafting audience engagement in social media conversations: Evidence from the U.S. 2020 presidential elections10.24251/HICSS.2022.395 ↗
5. Sentiment analysis of before and after elections: Twitter data of U.S. election 202010.3390/electronics10172082 ↗
6. Philippine national elections 2022: Voter preferences and topics of discussion on Twitter
7. If it looks, retweets and follows like a troll; Is it a troll?: Targeting the 2021 ecuadorian presidential elections trolls
8. Incremental real-time learning framework for sentiment classification: Indian general election 2019, a case study
9. An investigation into the impact and predictability of emotional polarity on the virality of Twitter tweets
10. Deep learning-based election results prediction using Twitter activity10.1007/s00500-021-06569-5 ↗
11. 2020 U.S. presidential election in swing states: Gender differences in Twitter conversations10.1016/j.jjimei.2022.100097 ↗
12. From twitter to Aso-Rock: A sentiment analysis framework for understanding Nigeria 2023 presidential election10.1016/j.heliyon.2023.e16085 ↗
13. Machine learning for predicting elections in Latin America based on social media engagement and polls10.1016/j.giq.2022.101782 ↗
14. Can Twitter analytics predict election outcome? An insight from 2017 Punjab assembly elections10.1016/j.giq.2019.101444 ↗
15. Kaggle, “Political social media posts,” 2023. https://www.kaggle.com/datasets/crowdflower/political-social-media-posts
16. Kaggle, “Global political tweets,” 2023. https://www.kaggle.com/datasets/kaushiksuresh147/political-tweets
17. Analysis and mining of an election-based network using large-scale Twitter data: A retrospective study10.1007/s13278-023-01081-0 ↗
18. A BERT based sentiment analysis and key entity detection approach for online financial texts
19. AraBERT: Transformer-based model for Arabic language understanding
20. Comparison of SVM naïve bayes algorithm for sentiment analysis toward West Java Governor candidate period 2018-2023 based on public opinion on Twitter
21. Experimental comparative analysis on convolutional neural network (CNN) and recurrent neural network (RNN) on aspect-level sentiment analysis
22. ABCDM: An attention-based bidirectional CNN-RNN deep model for sentiment analysis10.1016/j.future.2020.08.005 ↗
23. Enhanced sentiment extraction architecture for social media content analysis using capsule networks10.1007/s11042-021-11471-1 ↗
24. Sentiment analysis model based on self-attention and character-level embedding10.1109/ACCESS.2020.3029694 ↗
25. Predicting the ideological orientation during the Spanish 24M elections in Twitter using machine learning10.1007/s00146-017-0761-0 ↗
26. A hybrid method for sentiment analysis of election related tweets
27. A method for predicting the winner of the USA presidential elections using data extracted from Twitter
28. Predicting politician’s supporters’ network on Twitter using social network analysis and semantic analysis10.1155/2020/9353120 ↗
29. A novel sentiment analysis of social networks using supervised learning10.1007/s13278-014-0181-9 ↗
30. Analyzing Delhi assembly election 2015 using textual content of social network
31. Determining the popularity of political parties using Twitter sentiment analysis
32. A comparative study between rule-based and transformer-based election prediction approaches: 2020 US presidential election as a use case
33. Predicting elections from social media: A three-country, three-method comparative study10.1080/01292986.2018.1453849 ↗
34. Spatio-temporal trend analysis of the Brazilian elections based on Twitter data
35. Analysis of political sentiment orientations on Twitter10.1016/j.procs.2020.03.201 ↗
36. BERTweet: A pre-trained language model for English Tweets
37. PoliBERTweet: A pre-trained language model for analyzing political content on twitter
38. BioBERT: A pre-trained biomedical language representation model for biomedical text mining10.1093/bioinformatics/btz682 ↗
39. FinBERT: A large language model for extracting information from financial text*10.1111/1911-3846.12832 ↗
40. ABioNER: A bert-based model for Arabic biomedical named-entity recognition10.1155/2021/6633213 ↗
41. K. K. Bressem, J. M. Papaioannou, P. Grundmann, F. Borchert, L. C. Adams et al., “MEDBERT.de: A comprehensive german bert model for the medical domain,” arXiv:2303.08179, 2023.10.1016/j.eswa.2023.121598 ↗
42. MolRoPE-BERT: An enhanced molecular representation with rotary position embedding for molecular property prediction10.1016/j.jmgm.2022.108344 ↗
43. Sentiment analysis and topic modeling on tweets about online education during COVID-1910.3390/app11188438 ↗
44. Using VADER sentiment and SVM for predicting customer response sentiment10.1016/j.eswa.2020.113746 ↗
45. Deep learning based sentiment analysis of public perception of working from home through tweets10.1007/s10844-022-00736-2 ↗
46. SMOTE: Synthetic minority over-sampling technique10.1613/jair.953 ↗
47. Sentiment analysis of the pedulilindungi on google play using the random forest algorithm with SMOTE
48. KSCB: A novel unsupervised method for text sentiment analysis10.1007/s10489-022-03389-4 ↗