Abstract:
Opinions are the key factors that lead towards influencing our behavior. The
technique of Opinion Mining, also referred to as Sentiment Analysis, analyzes
people’s behaviors, attitudes, and emotions towards a service, product, topic,
or event. Since 2020, no country has remained untouched by COVID-19 and
the governing bodies of mostly every country have been applying several anti pandemic countermeasures to combat it. In this regard, it becomes
tremendously important to analyze people’s opinions when it comes to
tackling infectious diseases similar to COVID-19. The countermeasures taken
by any country to control the pandemic leave a direct and crucial impact on
each sector of public life, and every individual reacts to them in a different
manner. It is necessary to consider these reactions so that appropriate
messaging and decisive policies can be implemented. Pakistan, like every
other country, has done enough trying to control the spread of this virus. This
research aims to perform a sentimental analysis on the famous microblogging
social platform, Twitter, to get insights on public sentiments and the attitudes
displayed towards the precautionary steps taken by the government of
Pakistan in the years 2020 and 2021. These steps or countermeasures
include the closure of educational institutes, suspension of flight operations,
lockdown of business activities, enforcement of several Standard Operating
Procedures (SOPs), and the commencement of the vaccination program. A
total of four approaches were implemented for the analysis, which were the
Valence Aware Dictionary and sEntiment Reasoner (VADER), TextBlob, Flair,
and Bidirectional Encoder Representations from Transformers (BERT). The
first two techniques are lexicon-based. Flair is a pre-trained embedding-based
approach, whereas BERT is a transformer-based model. BERT was fine-tuned
and trained on a labeled dataset, and it achieved a validation accuracy of 92%.
It was observed that the polarity score kept varying from month to month in
both years for each of the countermeasures. This score was analyzed with
real-time events occurring in the country, which helped in understanding the
public’s sentiment and led to the possible formation of a notable conclusion.
All implemented approaches showed independent performances. However, it
was noticed from the classification results of both TextBlob and the fine-tuned
BERT model that the presence of neutral sentiment was dominant in the data
followed by the positive sentiment.