See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/311986158
Sentiment Analysis on Political Tweets
Article · January 2016
CITATIONS READS
2 3,933
3 authors, including:
Amit Prakash Singh
Guru Gobind Singh Indraprastha University
81 PUBLICATIONS 89 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Data analysis View project
INTERNATIONAL CONFERENCE ON KNOWLEDGE AND POLICY FOR SUSTAINABLE DEVELOPMENT: GLOBAL LESSONS AND LOCAL CHALLENGES View project
All content following this page was uploaded by Amit Prakash Singh on 31 December 2016.
The user has requested enhancement of the downloaded file.
th
V International Symposium on “Fusion of Science & Technology”,
New Delhi, India, January 18-22, 2016
ID: 2016-ISFT-286
Sentiment Analysis on Political Tweets
Ayeena Malik1, Divya Kapoor2, Amit Prakash Singh3
1
Sri Guru Tegh Bahadur Institute of Management & Information Technology, Nanak
1
Gurdwara Nanak 2Piao Campus G.T. Karnal Road, Delhi-110033
3
University School of ICT, GGS Indraprastha University, Dwarka, New Delhi
1
[email protected]Abstract: Sentiment analysis can be defined as a process of Using Natural language processing, statistics or machine
analyzing user reviews, opinions, emotions, sentiments, learning methods to extract identify and characterize the
attitude regarding various entities such as products, sentiment content of a text unit[6]. Textual information in
services, organization, key issues. The Web is place where the world can be broadly categorized into two main types:
anybody can express their opinions or post reviews about facts and opinions. Facts are objective expressions about
various entities. Social Media is actually influencing the entities, events and their properties. Opinions are usually
user’s point of view or individual opinions. It has now subjective expressions that describe people’s sentiments,
become an essential part of digital marketing. Sentiment appraisals or feelings toward entities, events and their
Analysis is a process of identifying and aggregating properties.
opinions of various about any issues or products.
Monitoring Social Media activities has now become a prime 2. LITERATURE REVIEW
concern for politicians to understanding their social image. Fedrico Neri [8] describes a sentiment analysis study
In this paper we are going to analyze the tweets of various performed on about 1000 Face book posts about new casts
users regarding a political leader, which showcases the and comparing the sentiments of Rai.In which two
responses or opinions of voters pre and post-elections. techniques of Sentiment Analysis can be used:
Keywords: Sentiment Analysis, political tweets, social Supervised Machine Learning- It requires a training set of
media, opinions texts with manually assigned polarity values for eg. they
learn features(words) that correlates with the value.
1. INTRODUCTION
Unsupervised Machine Learning- That uses a lexicon with
Sentiment analysis can be defined as a process of analysing words scored for polarity values such as neutral, positive or
user reviews, opinions, emotions, sentiments, attitude negative. To extract opinions and their sentiments the
regarding various entities such as products, services, following logical components are there:
organization, key issues. The Web is place where anybody
can express their opinions or post reviews about various • Crawler-Gathers document from internet
entities. Social Media is actually influencing the user’s point
of view or individual opinions. It has now become an • Semantic engine –identifies relevant knowledge in the
essential part of digital marketing. Sentiment Analysis is a texts
process of identifying and aggregating opinions of various • Search engine- enables natural language, semantic and
about any issues or products.Sentiment analysis is similar to semantic role queries.
opinion mining, with the help of which we can analyze the
user’s view by detecting the polarity of the text. Polarity • Machine translation engine- enables automatic
means we can analyze the text on the basis of their views translation of search results.
posted online i.e. to determine whether the piece of writing
• Geo-referential engine- enables an interactive
is positive, negative or neutral [1-5]. Sentiment Analysis is
geographical representation of documents.
used to discover how people feel about a particular topic or
a product. To buy a product the user checks the various • Classification engine-classifies search results into
social networking sites for reviews. These reviews and clusters and sub-clusters, highlighting meaningful
ratings on the Internet matters a lot to evaluate the product. information.
Monitoring social media activities is necessary to evaluate
Yasufumi Takama [9] in their paper proposed method by
the customer’s loyality and also to keep track on their
which a user profile is generated by using user’s TV
sentiments regarding a brand or a product, impact of various
watching behavior using sentiment analysis. The method
marketing activities and many other aspects.
generates positive and negative profile with bookmark
ISBN: 978-93-84935-64-1 ♦ 359 ♦
Sentiment Analysis on Political Tweets
format for each user based on iEPG and estimated rating of fetch certain access keys and tokens for the extraction and
watching TV programme.If user watches program for long filtering of the tweets as required by the user and putting it
time that means he/she is interested and if changes channel in a database for further mapping of these tweets for
frequently that means he/she is not interested.Daniel E.O’ sentiment analysis of the same. The access keys are
Leary in his paper focused on blog mining-reviews. He generated and the tweets are extracted and put in the
termed blog as type of media that allows user to present a database. The approach to extract the tweets from the twitter
range of information including opinions and personal views. database according to the user’s need is a generic one as the
Organizations are looking upon blogs as an important user has the control over how many and which tweets are
source of information and knowledge. Blogs may contain required by the user and he/she can work according to the
redundant and co related information about any topic desired level of complexity. The initial stepis to extract
financial, political, entertainment and news.It represents a tweets from a twitter account which is accomplished by
single individual or a group. Blog mining is a process of making an account on twitter. From the respective account,
searching and analyzing blogs in order to generate a twitter development application is created on the
additional insights that might otherwise not be found by developers end through an application on twitter site which
examining a single blog[8], Capturing information from gives the user the access to certain keys. These keys are the
blogs is very useful to various marketing researches about used in the code to extract the tweets from the database and
the sentiments of buyers and potential buyers of their save them in a .csv file. The .csv file generated is used as an
products. Sometimes sample of blogs are selected when the input for the next modules in the code to generate the
organization is concerned with opinions of a particular required result from the analysis of the sentiments. With the
group or community. Random sample of blogs are selected grant of the keys, now the extraction of the tweets starts.
when we require a broad base of opinions. Particular type of The access tokens are now generated via the keys. With the
all available blogs are selected when we require an opinion help tokenization, the tweets are split to words and every
according to a particular context. Blogs can be selected on word is referred with a dictionary and its polarity is
the bases of time or a particular topic. Resources of a blog determined. We are using dictionary i.e. AFFINN-111.We
can be Internal if generated by employees of the assign a sentiment score to the words (Sw) to those words
organization or can be External if taken from outside that are not present in AFINN-111 through this simple
sources i.e. customers. Opinions and sentiments can be formula:
determined with the help of frequency of appearance of
words. To analyze the frequency of appearance of words we
look for particular words or phrases used. Almost 50% of
the blogs are Splogs i.e. Spam Blogs and are designed to
induce readers to click advertisement and to get search where,
engine to capture number of links. Polarity of the blogs can N is the number of tweets that contain the word
be examined by the tags placed on the blogs. The unit of St is the sentiment score of the tweet that contains the word
reference may be word level, sentence level, or paragraph W.
level and with the help of mood declaration we may classify The sentiment of a tweet is determined based on the higher
the blogs as positive, negative or neutral. Blogs provide a value os s+ or s-.
platform for bloggers to express their opinions on a range of If the values are equal the tweets are considered neutral.
issues.
Namrata Godbole [9] proposed the large scale sentiment
analyses for news and blogs.The frequency of adjectives is
tracked with positive and negative polarity using
WordNet.Sentiment hop counts to determine the strength of
the candidate terms and eliminate ambiguous terms. 4. RESULTS
Adjectives separated by “And” have same polarity but those In this paper we are analyzing the tweets of our PM
separated by “But” have opposite polarity. Machine learning Narendra Modi before and after his foreign visits. The
techniques perform better than simple counting methods and results are presented in the table 1:
are more accurate.
TABLE 1 : Polarity score of tweets PM Narendra Modi
3. METHODOLOGY USED
This paper examines the sentiment analysis of a prominent Polarity score Modi Modi After Foreign
political figure by analysing a dataset gathered from the visits
micro blogging site that is twitter. The dataset is obtained Positive 21 27
from twitter during the Prime Minister Narender Modi’s Negative -19 -2
visit to United States of America. The project work starts
Neutral 14 12
with the creation of a twitter application which helps us
th
V International Symposium on “Fusion of Science & Technology”, New Delhi, India, January 18-22, 2016 ♦ 360 ♦
Sentiment Analysis on Political Tweets
[2] Dave, K.; Lawrence, S.; Pennock. D.M. Mining the
30
25
Peanut Gallery: Opinion Extraction and Semantic
20 Classification
fication of Product Reviews. In Proceedings of
15 the 12th International Conference on World Wide
10 Web, 2013.
5
0 [3] Hu M.Mining and Summarizing Customer Reviews.
-5 In Proceedings of ACM SIGKDD Conference on
-10 Knowledge Discovery and Data Mining, 2004.
-15
-20 [4] Pang, B.; Lee, L. A Sentimental Education:
Modi Modi After Foreign
Sentiment Analysis Using Subjectivity
visits Summarization Based on Minimum Cuts. In
Positive Negative Neutral Proceedings of the 42nd Annual Meeting of the
Association for Computational Linguistics, 2004.
Fig. 1. Polarity score of tweets PM Narendra Modi [5] Pang, B.; Lee, L.; Vaithyanathan, S. Thumbs Up?
Sentiment Classification Using Machine Learning
5. CONCLUSIONS Techniques. In Proceedings of the Conference on
Empirical Methods in Natural Language Processing,
The use of sentiment analysis for tweets has a wide scope as
2002.
it analyzes the sentiment of the people in an area and thus
all the strategies and estimation
timation can be based on how the [6] Pang, B.; Lee, L. Opinion Mining and Sentiment
people of that area respond to various political mandates. Analysis. In Foundations and Trends in Information
The sentiment analysis can be very useful to identify the Retrieval, 2008.
grey areas for a political leader and thus help the respective [7] Mouthami, K.; Devi, K. N.; Bhaskaran V.
party to ennoble the status of the leader sso as to win the M.Sentiment
Sentiment Analysis and Classification Based On
elections. It can also be a useful tool in predicting the results Textual Reviews. In Proceeding 2013 of IEEE
of an election with high accuracy and thus provide help to International Conference on Information
take the required action accordingly. All in all, with such a Communication & Embedded System, 2013.
tool to judge the preferences of the people in terms of [8] Neri, F.; Aliprandi, C.; Capeci, F.; Caudros,M.;
Caudro
politics could hold the key to a leader’s win in an election Tomas.Sentiment Analysis on Social Media. ACM
and also could help improve the strategies that are to be International Conference on advances in Social
taken up by the party so that they are in best interest of the Network Analysis and Mining, 2012.
people being based on people’s own preference. With such a [9] Takama, Y.; Moto,Y.; Profile Generation from TV
tool in hand,, the tide could be completing reversed and that Watching Behavior using Sentiment Analysis. ACM
matters a lot in politics. Thus, sentiment analysis may hold International Conferences on Web Intelligence and
the key to the political decisions in the times to come. Agent Technology, 2007.
[10] Daniel, E. Blog mining-review
review and extensions.
6. FUTURE SCOPE Decision Support Systems, Elseivier, 2011.
The data available online is inevitable which can be further [11] Godbole, N.; Srinivasaiah, M.; Skiena, S. Large
useful in analyzing
zing sentiments of people online. Sentiment Scale Sentiment Analysis for News and Blogs.
analysis or opinion mining finds its application in almost ICWSM, 2007.
every field. Most brands are using sentiment analysis tools [12] Wangg, H.; Liu, u, H.; Song, W.; Feature-Based
Feature
to view and analyze the opinions of the actual users who are Sentiment Analysis Approach for product reviews.
using their brand products. Similar to this the brands can Journal of Software, 2014.
also have an idea of what kind of services are appreciated by [13] Medhat, W.; Hassan, A.; Korashy, H.Sentiment
the customers along with their products. With the help of analysis algorithms and applications: A survey. Ain
opinion mining news and media houses are trying to analyze Shams Engineering Journal, 2014, 5, 4.
the image of political leaders either after orr before elections. [14] Agarwal, A.; Xie, B.; Vovsha, I.; Rambow, O.;
But still a lot of challenges come in the way of sentiment Passonneau, R. Sentiment Analysis of Twitter
analysis as there are some cases when the reviews available Data.ACM Proceeding of LSM 2011 of the
are influenced or paid reviews. The future of sentiment workshop on Languages in Social Media, 2011, 30- 30
analysis lies in not only attaining accurate results but als also 38.
detecting fake reviews [15] Asur, S.; Huberman, B. A. Predicting the Future
With Social Media. IEEE/WIC/ACM International
Inter
REFERENCES
Conference on Web Intelligence and Intelligent
[1] Liu, B.; Indurkhya, N.; Damerau. Sentiment Analysis Agent Technology, 2010.
and Subjectivity. Handbook of Natural Language
Processing. 2010.
th
V International Symposium on “Fusion of Science & Technology”, New Delhi, India, January 18
18-22,
22, 2016 ♦ 361 ♦
View publication stats