
Election Result Prediction Using Sentiment Analysis
Author(s) -
Ankit Maurya,
Satish Lodh,
Mayur Prataprai Joshi,
Prof. Vinaykumar Singh
Publication year - 2021
Publication title -
international journal of advanced research in science, communication and technology
Language(s) - English
Resource type - Journals
ISSN - 2581-9429
DOI - 10.48175/ijarsct-v4-i3-018
Subject(s) - computer science , python (programming language) , sentiment analysis , naive bayes classifier , social media , polling , microblogging , random forest , support vector machine , information retrieval , data mining , world wide web , machine learning , operating system
Social media today has become a very popular communication tool for users. Millions of users share their opinions on different aspects on daily basis. Sentiment Analysis determines the polarity and inclination towards any specific topic, idea or entity. Applications of such analysis can be seen during elections, movie promotions, and many other fields. In our project, we aim to predict the winning probability of any political party by using both labelled as well as unlabeled data. Labelled data can be collected by using polling method but the result may not provide better accuracy. Hence, it is necessary to fetch live data to predict the accurate election result. Twitter is a microblogging site which allows the users in posting quick and real-time updates about different activities or events as the spread of information and news is quick enough. With the help of hashtags, the needed data can be easily generated and put to use. We exploited the python library “Tweepy” for accessing the Twitter API and fetched live data from Twitter. 350 tweets for each political party are fetched by using keywords. Using “TextBlob” library of python, sentiments are applied to each tweet and depending upon more positive tweets for particular party, winning party is declared. Also, popular text classification algorithms like Na¨ıve Bayes, SVM and Random Forest are used to train model using labelled data. The accuracy of the predicted result is calculated and the result is declared Finally, result is represented in the form of bargraph for labelled data according to the number of voted for each political party and for unlabeled data using pie chart for each political party representing positive, negative and neutral sentiments.