Sentiment Analysis Model for Parliamentary Elections Combining Electoral Dictionary Using Machine Learning

Doaa Mohamed Alkhiary, Samir Abu El Fotuoh Saleh, Mohamed Ebrahim Marie

DOI:  10.5281/zenodo.14655667

Abstract:

Amid the massive digital boom, the vast expansion of digital textual data, and the variety of opinions on social media, significant opportunities have emerged for innovative research in sentiment analysis to gauge public opinion across various life domains, political polarization, and its use in election campaigns. Twitter, in particular, serves as a repository of data and opinions. This study focuses on a dataset collected from Twitter via the API, related to political opinions on the 2020 parliamentary elections, both in the pre-election period and on election days. The data includes lists of parties and independent candidates with Twitter accounts used to promote their campaigns. The sample contains 2600 tweets, and techniques such as Support vector machine (SVM), Naive Bayes (NB),Random Forest (RF), and Decision Tree  (DT) were applied, along with TF-IDF and weight average, to obtain results for each technique and determine which is more accurate and reflective of reality. The comparison shows that NB is the most accurate technique. This study also found that having a specialized dictionary for electoral terminology is essential, as no researchers have yet developed a dictionary specifically for electoral terms in Egyptian colloquial Arabic.

Keywords:

sentiment analysis, Election, parliament, techniques, dictionary.