Opinion Mining and Sentimental Analysis of Twitter Data During India’s General Elections

Ankita Bhowmik, Sai Keerthiga Murugan, V Vani, N Karthik · 2024

Social Networks like Twitter have become significant sources of political discourse, offering valuable insights into public sentiment and attitudes during elections. This research analyzes emotions in tweets related to political figures Party 1 and Party 2 to predict public sentiment and potentially forecast election outcomes. Our study focused on extracting emotional tones from tweets, classifying them as positive or negative, and then assessing how these emotions relate to each candidate’s popularity. Data preprocessing was a crucial initial step in preparing the Twitter data for analysis, involving tasks such as text cleaning and tokenization. We used several Machine Learning (ML) algorithms, including K-Nearest Neighbors (KNN), Random Forest, Multinomial Naive Bayes, Gaussian Naive Bayes, and Random Forest to build sentiment classifiers. These models were trained on labeled data to distinguish between positive, negative, and neutral emotions expressed in tweets. Our findings revealed that the Random Forest and KNN model yielded a more accurate sentiment classification. For Party 1, the model achieved an accuracy of 71%, while for Party 2, it achieved an accuracy of 70%. Based on the sentiment expressed in tweets, these results imply that the Random Forest model could serve as a dependable predictor of public sentiment towards these political figures. This research not only shows the potential of analyzing emotions based on social media data to gather public sentiment during elections but also highlights the significance of emotion-driven insights for political campaigns and electoral strategies. The potential of the Random Forest model for prediction could be valuable in gaining insights into public sentiment and making informed choices for campaign adjustments or foreseeing election results.

Read the paper · More papers on PaperTik