Melola Discovery

← Melola Discovery

Journal

Sentiment Analysis on Twitter Social Media Regarding Covid-19 Vaccination with Naive Bayes Classifier (NBC) and Bidirectional Encoder Representations from Transformers (BERT)

Recursive Journal of Informatics · Vol. 2 No. 2 (2024) · pp. 106–113

DOI
10.15294/7h63ma50
ISSN
2986-6588, 2963-5551
Published
2024-09-30
Publisher
Universitas Negeri Semarang
Language
eng

Abstract

Abstract. The Covid-19 vaccine is an important tool to stop the Covid-19 pandemic, however, there are pros and cons from the public regarding this Covid-19 vaccine. Purpose: These responses were conveyed by the public in many ways, one of which is through social media such as Twitter. Responses given by the public regarding the Covid-19 vaccination can be analyzed and categorized into responses with positive, neutral or negative sentiments. Methods: In this study, sentiment analysis was carried out regarding Covid-19 vaccination originating from Twitter using the Naïve Bayes Classifier (NBC) and Bidirectional Encoder Representations from Transformers (BERT) algorithms. The data used in this study is public tweet data regarding the Covid-19 vaccination with a total of 29,447 tweet data in English. Result: Sentiment analysis begins with data preprocessing on the dataset used for data normalization and data cleaning before classification. Then word vectorization was performed with TF-IDF and data classification was performed using the Naïve Bayes Classifier (NBC) and Bidirectional Encoder Representations from Transformers (BERT) algorithms. From the classification results, an accuracy value of 73% was obtained for the Naïve Bayes Classifier (NBC) algorithm and 83% for the Bidirectional Encoder Representations from Transformers (BERT) algorithm. Novelty: A direct comparison between classical models such as NBC and modern deep learning models such as BERT offers new insights into the advantages and disadvantages of both approaches in processing Twitter data. Additionally, this study proposes temporal sentiment analysis, which allows evaluating changes in public sentiment regarding vaccination over time. Another innovation is the implementation of a hybrid approach to data cleansing that combines traditional methods with the natural language processing capabilities of BERT, which more effectively addresses typical Twitter data issues such as slang and spelling errors. Finally, this research also expands sentiment classification to be multi-label, identifying more specific sentiment categories such as trust, fear, or doubt, which provides a deeper understanding of public opinion.

Keywords

Collaboration network of the authors

39 authors · 119 co-authorship links · 12 across different organisations

Hover or tap a name to highlight its co-authors. Double-click to open the author's page.

  • State University of Semarang
  • Tun Hussein Onn University of Malaysia
  • Institut Teknologi Kalimantan
  • Badan Pengkajian dan Penerapan Teknologi
  • Affiliation unknown
  • Different organisations
  • Same organisation
  • Affiliation unknown
  • Thicker line = more joint articles · bigger circle = more articles
Show as table
Co-authorOrganisationJoint articles
Much Aziz MuslimTun Hussein Onn University of Malaysia2
Grace Yudha SatriawanAffiliation unknown2
Salsabila Rahadatul AisyAffiliation unknown2
Erwin PrasetyoState University of Semarang1
Nafa FajriatiState University of Semarang1
Jumanto JumantoState University of Semarang1
Rofik RofikState University of Semarang1
Endang SugihartiState University of Semarang1
Alamsyah AlamsyahInstitut Teknologi Kalimantan1
Riza ArifudinState University of Semarang1
Athifa Dihyan CalystaState University of Semarang1
Regina Ayumi UlayyaaState University of Semarang1
Barokah IsdaryantiState University of Semarang1
Isti HidayahAffiliation unknown1
Lyna LatifahAffiliation unknown1
FafuridaAffiliation unknown1
Sabrina Desy RahmawatiAffiliation unknown1
Adam Satrio KanzaAffiliation unknown1
Agus Bayu PamungkasAffiliation unknown1
Edward JhonatanAffiliation unknown1
Fredy Kusuma NellyAffiliation unknown1
Fariska Ratna FauziahAffiliation unknown1
Desi Adrianti AwaliyahAffiliation unknown1
Rini MuzayanahAffiliation unknown1
Apri Dwi LestariAffiliation unknown1
M. Anbiya Nur IslamAffiliation unknown1
Anwar AnwarAffiliation unknown1
Djoko Wahyu KarmiadjiBadan Pengkajian dan Penerapan Teknologi1
Budi HaryantoAffiliation unknown1
Ogi IvanoAffiliation unknown1
Mustasyar PerkasaAffiliation unknown1
Makmuri NuraminAffiliation unknown1
Yudi IrawadiAffiliation unknown1
Yana HeryanaAffiliation unknown1
Indra HardimanAffiliation unknown1
Saeful AndhiAffiliation unknown1
Wahyu PurnawirawanAffiliation unknown1

Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.

Metadata source: OAI-PMH (metadata jurnal) https://journal.unnes.ac.id/journals/rji/oai, first harvested 6 Nov 2026, last seen 8 Nov 2026.
Original metadata (oai_dc)
<oai_dc:dc xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/  http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
	<dc:title xml:lang="en">Sentiment Analysis on Twitter Social Media Regarding Covid-19 Vaccination with Naive Bayes Classifier (NBC) and Bidirectional Encoder Representations from Transformers (BERT)</dc:title>
	<dc:creator xml:lang="en">Saputra, Angga Riski Dwi</dc:creator>
	<dc:creator xml:lang="en">Prasetiyo, Budi</dc:creator>
	<dc:subject xml:lang="en">Sentiment Analysis</dc:subject>
	<dc:subject xml:lang="en">Naïve Bayes Classifier</dc:subject>
	<dc:subject xml:lang="en">BERT</dc:subject>
	<dc:subject xml:lang="en">Social Media</dc:subject>
	<dc:subject xml:lang="en">Twitter</dc:subject>
	<dc:description xml:lang="en">Abstract.&amp;nbsp;The Covid-19 vaccine is an important tool to stop the Covid-19 pandemic, however, there are pros and cons from the public regarding this Covid-19 vaccine.
Purpose:&amp;nbsp;These responses were conveyed by the public in many ways, one of which is through social media such as Twitter. Responses given by the public regarding the Covid-19 vaccination can be analyzed and categorized into responses with positive, neutral or negative sentiments.
Methods:&amp;nbsp;In this study, sentiment analysis was carried out regarding Covid-19 vaccination originating from Twitter using the Naïve Bayes Classifier (NBC) and Bidirectional Encoder Representations from Transformers (BERT) algorithms. The data used in this study is public tweet data regarding the Covid-19 vaccination with a total of 29,447 tweet data in English.
Result:&amp;nbsp;Sentiment analysis begins with data preprocessing on the dataset used for data normalization and data cleaning before classification. Then word vectorization was performed with TF-IDF and data classification was performed using the Naïve Bayes Classifier (NBC) and Bidirectional Encoder Representations from Transformers (BERT) algorithms. From the classification results, an accuracy value of 73% was obtained for the Naïve Bayes Classifier (NBC) algorithm and 83% for the Bidirectional Encoder Representations from Transformers (BERT) algorithm.
Novelty:&amp;nbsp;A direct comparison between classical models such as NBC and modern deep learning models such as BERT offers new insights into the advantages and disadvantages of both approaches in processing Twitter data. Additionally, this study proposes temporal sentiment analysis, which allows evaluating changes in public sentiment regarding vaccination over time. Another innovation is the implementation of a hybrid approach to data cleansing that combines traditional methods with the natural language processing capabilities of BERT, which more effectively addresses typical Twitter data issues such as slang and spelling errors. Finally, this research also expands sentiment classification to be multi-label, identifying more specific sentiment categories such as trust, fear, or doubt, which provides a deeper understanding of public opinion.</dc:description>
	<dc:publisher xml:lang="en">Universitas Negeri Semarang</dc:publisher>
	<dc:date>2024-09-30</dc:date>
	<dc:type>info:eu-repo/semantics/article</dc:type>
	<dc:type>info:eu-repo/semantics/publishedVersion</dc:type>
	<dc:type xml:lang="en">Peer-reviewed Article</dc:type>
	<dc:format>application/pdf</dc:format>
	<dc:identifier>https://journal.unnes.ac.id/journals/rji/article/view/34871</dc:identifier>
	<dc:identifier>10.15294/7h63ma50</dc:identifier>
	<dc:source xml:lang="en">Recursive Journal of Informatics; Vol. 2 No. 2 (2024): September 2024; 106 - 113</dc:source>
	<dc:source>2986-6588</dc:source>
	<dc:source>2963-5551</dc:source>
	<dc:source>10.15294/w8ab6m87</dc:source>
	<dc:language>eng</dc:language>
	<dc:relation>https://journal.unnes.ac.id/journals/rji/article/view/34871/6329</dc:relation>
</oai_dc:dc>