# Sentiment Analysis of Tweets on Online Education
during COVID-19

Elif Yıldırım, Harun Yazgan, Onur Özbek, Ahmet Can Günay, Büşra Kocaçınar, Öznur Şengel, Fatma Patlar Akbulut

<figure><img src="image_1.png" /></figure>

► To cite this version:

Elif Yıldırım, Harun Yazgan, Onur Özbek, Ahmet Can Günay, Büşra Kocaçınar, et al. Sentiment Analysis of Tweets on Online Education during COVID-19. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.240-251, 10.1007/978-3-031-34111-3_21. hal-05449777

HAL Id: hal-05449777

https://inria.hal.science/hal-05449777v1

Submitted on 9 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Sentiment Analysis of Tweets on Online Education during COVID-19

Elif Yıldırım<fnref n="1" />(✉), Harun Yazgan<fnref n="1" />, Onur Özbek<fnref n="2" />, Ahmet Can Günay<fnref n="2" />, Büşra Kocaçınar<fnref n="1" />(✉), Öznur Şengel<fnref n="1" />(✉), and Fatma Patlar Akbulut<fnref n="3" />(✉)

**Abstract.** The global coronavirus disease (COVID-19) pandemic has devastated public health, education, and the economy worldwide. As of December 2022, more than 524 million individuals have been diagnosed with the new coronavirus, and nearly 6 million people have perished as a result of this deadly sickness, according to the World Health Organization. Universities, colleges, and schools are closed to prevent the coronavirus from spreading. Therefore, distance learning became a required method of advancing the educational system in contemporary society. Adjusting to the new educational system was challenging for both students and instructors, which resulted in a variety of complications. People began to spend more time at home; thus, social media usage rose globally throughout the epidemic. On social media channels such as Twitter, people discussed online schooling. Some individuals viewed online schooling as superior, while others viewed it as a failure. This study analyzes the attitudes of individuals toward distance education during the pandemic. Sentiment analysis was performed using natural language processing (NLP) and deep learning methods. Recurrent neural network (RNN) and one-dimensional convolutional neural network (1DCNN)-based network models were used during the experiments to classify neutral, positive, and negative contents.

**Keywords:** Deep Learning · Sentiment Analysis · Social Media · COVID-19 · Distance Education

## 1 Introduction

The COVID-19 disease, which started to spread over the globe in late February 2019, plunged the entire planet into a pandemic. Globally, It had an impact on every subject of human life, including science, sports, entertainment, transportation, social interactions, politics, and commercial operations. The reality of

This research is supported by Istanbul Kultur University under ULEP-2022-2023.

© IFIP International Federation for Information Processing 2023

Published by Springer Nature Switzerland AG 2023

I. Maglopiannis et al. (Eds.): AIAI 2023, IFIP AICT 675, pp. 240–251, 2023.

https://doi.org/10.1007/978-3-031-34111-3_21

<footnote n="1">¹ Department of Computer Engineering, Istanbul Kültür University, Istanbul, Turkey
{elif.yildirim,b.kocacinar,o.sengel}@iku.edu.tr</footnote>

<footnote n="2">² Department of Electrical-Electronic Engineering, Istanbul Kültür University, Istanbul, Turkey</footnote>

<footnote n="3">³ Department of Software Engineering, Istanbul Kültür University, Istanbul, Turkey
f.patlar@iku.edu.tr</footnote>
the situation is difficult to bear as a result of threats, and the education sector
continues to be one of the worst affected by the coronavirus pandemic. No coun-
try or race on the globe is currently immune to the coronavirus pandemic, and
COVID-19's rapid expansion and catastrophic effects seem to be overwhelming
the whole planet. As the COVID-19 threat increased, it became harder to man-
age this situation, especially in areas in which the disease can spread quickly,
for example, schools. After only a few months since the sickness first appeared,
it has already significantly altered everyone's way of life, forcing billions of peo-
ple to "remain at home," "observe self-isolation," and conduct work and school
from their homes. It has restricted people's freedom to move around, work, and
socialize.

Numerous lessons about pandemics’ sociological, ethical, scientific, and med-
ical aspects can be learned from history. The current pandemic is taking place
against a backdrop of increased skepticism toward science, which is occasionally
purposefully fostered for political purposes. There has never been a greater need
to teach the public and future scientists how to think critically, base their argu-
ments on evidence, and be active and socially responsible citizens. Global edu-
cation systems urgently need to adopt curriculum, instruction, and assessment
strategies to enable students to develop scientific habits of thought. The qual-
ity of online learning settings is under intense pressure because of the present
health crisis. When students are unable to appear in person for exams, high-
stakes assessment systems confront major accountability issues in getting accu-
rate measures of learning outcomes. Over 1.5 billion students, or 87% of all
students worldwide, have been impacted by the COVID-19 pandemic-related
school closures, according to UNESCO [11]. Global health systems have found
it extremely challenging to handle the educational disruptions and global health
issues brought on by the COVID-19 pandemic.

Another issue is that COVID-19 increases social inequality in classrooms. Parents with greater financial resources send their children to schools with superior digital infrastructure and teachers who may be more efficient in using advanced technology. Some schools may be well-stocked with digital resources and teaching aids. Students from disadvantaged backgrounds attend institutions with inadequate ICT infrastructure and instructional resources. More privileged students are enrolling in schools and using online learning as a result of COVID-19. Institutions in underprivileged rural locations lack the necessary infrastructure to deliver instruction remotely. In terms of technology and instructional resources, private and public schools differ significantly from one another. According to the Tadesse et al. survey [18], students experience high levels of stress, anxiety, and depression disorders while schools are closed.

The COVID-19 pandemic may endure for a considerable amount of time,
and its effects on modern science and society are likely to be felt for a significant
period of time. Thus, the papers focus on understanding how society has been
perceiving online education during the COVID-19 outbreak period by analyzing
tweets. This paper presents a sentimental analysis of Twitter comments based on
sequential models to find out what people think about online education during the COVID-19 pandemic.

## 2 Related Work

Today, social media, in which individuals express their emotions and thoughts through information technology while getting information about the emotions and thoughts of others, creates a robust network of information, communication, and engagement. People have made social media the primary source of information by expressing their emotions and thoughts to the public via their social media accounts. On the basis of this circumstance, it can be stated that social media has vast data [12, 13, 15].

The rapid growth of information sharing and access in social media networks has spawned the concept of transforming information into informatics in this industry. In this context, the concept of sentiment analysis or opinion mining is on its way to becoming the bright star of the growing information industry with technological developments [2]. Sentiment analysis continues to be developed by identifying problems in the studies carried out [17]. In their works, Fang and Zhan [6] attempted to assist by investigating the issue of categorizing emotion polarity and contributing to various stages of emotion analysis. They provided a new technique for identifying negative statements and a method for generating feature vectors for polarity classification in sentiment analysis.

This epidemic process has been the subject of an extensive investigation involving both coronavirus and artificial intelligence technology. Among these works, research focusing on sentiment analysis of COVID-19 using social media data stands out [1,3] (Fig. 1). This is because individuals, corporations, and governments are communicating through social media about the COVID-19 outbreak. Following the increase of dread linked with the rapid spread of COVID-19 infections, Samuel et al. [16] offered a systematic method for analyzing Twitter data in order to determine public mood. According to the findings of this study, the Naive Bayes approach delivers roughly 91% accuracy for short tweets, whereas the logistic regression method provides approximately 74% accuracy for shorter tweets. In another study [8], researchers aimed to undertake a novel NLP study based on an LSTM model to find important hidden themes and classify emotion-related comments in COVID-19-related topics. Their LSTM model performed better than well-known machine learning techniques, with an accuracy of 81.15 percent.

One of the high-performing methods in recent years develop for processing natural language, Bidirectional Encoder Representations from Transformers (BERT) has started to garner attention alongside all the other innovations. BERT is a deep learning method for NLP that helps artificial intelligence programs understand the context of ambiguous words in a text. In a study conducted on the tweets of Indian citizens [4], the BERT model outperformed the more established logistic regression (LR), support vector machine (SVM), and LSTM models with an accuracy of 89%. Based on their analysis of 3090 tweets,
they found that the BERT model performed the best, while the LR and SVM models both obtained roughly 75% accuracy, and the LSTM model performed at only 65% accuracy.

<figure><img src="image_4.png" /><figcaption>Fig. 1. Word cloud showing some words of the subject</figcaption></figure>

## 3 Sentiment Analysis

Increased internet usage and technological advancements have led to an expansion in the amount of information. People use social media even more during pandemic restrictions, such as staying at home. The increasing popularity of social media has created new academic topics. Clustering [5,9,14], automatic text summarization [7,20], and sentiment analysis are only a few of the study subjects generated by this data deluge. When seen from this angle, it is simple to observe people's comments, likes and dislikes, desires, concerns, health and financial issues, and many other features when perusing social media posts on popular platforms such as Twitter, Facebook, or Instagram. These kinds of approaches establish the foundation for sentiment analysis or idea mining [10]. The process of automatically extracting subjective information from a text is called sentiment analysis. Using sentiment analysis, we may detect whether a text's subjective orientation is positive or negative. Sentiment analysis in social media posts is one of the most essential approaches [19]. However, with the explosion of user-generated material on the Internet, particularly in recent years, it has become a universe unto itself. The way individuals share their ideas and beliefs has also altered as a result of this atmosphere. Individuals may now submit their thoughts about a product they purchased on their website, as well as in internet forums, discussion groups, blogs, and social media about nearly anything. Long forum messages and blogs are frequently a source of inspiration. As a result, finding relevant sources, extracting phrases about concepts, reading, summarizing, and organizing them into usable formats is tough [19]. As a result, systems that automatically find and summarize opinions are required. While
the fundamental foundations of emotion analysis are created by processing this information, removing subjectivity, and classifying emotion, this also involves problems owing to its structure.

# 4 Proposed Sentiment Model

The task initially consisted of collecting tweets that were in some way relevant to the subject of distance education. We gathered the tweets dataset using Twint<fnref n="1" />. We utilized the search terms “covid and education” to narrow the output. During the data collecting procedure, numerous irrelevant details such as id, username, location, date, geo, and mentions were also gathered. Such information as that depicted in Fig. 2 is undesirable since it consumes memory and processing time.

<figure><img src="image_5.png" /><figcaption>Fig. 2. Data reduction with eliminating unnecessary features</figcaption></figure>

Since preprocessing was the initial step in the NLP model-building procedure, during the early round of data collection, we realized cleaning and arranging the raw data. Data preparation is an essential step since it influences the performance of the chosen model, and the results depend on how well the data has been preprocessed. In the final phase, we completed the data processing portion by tokenizing the data. The details of all stages are explained hereafter.

## 4.1 Preprocessing

The removal of punctuation marks and stopwords, which is used to divide the text into sentences, paragraphs, and phrases, affects the results of any text processing technique, particularly those that rely on word and phrase occurrence

<footnote n="1">¹ Twint - Twitter intelligence tool, 2022.</footnote>
frequencies, as punctuation marks are often employed in the text. Stop words are a collection of commonly used words without further contexts, such as articles, determiners, and prepositions. Some of the terms frequently used in texts that need to be removed are “a,” “an,” “the,” etc. These terms have no actual meaning because they don’t help distinguish between the contexts. By removing these commonly used words from the text, we have been able to focus on the relevant concepts. Case sensitivity is another point of text data to keep in mind. Although “Book” and “book” have the same meaning, they are represented as separate words in the vector space model if they are not converted to lowercase. It also results in the production of additional dimensions. As a result, it has an effect on our processing speed and the accuracy of our deep learning models. Therefore, we converted every letter into lowercase. Tokenization, or dividing a sentence into words, is a fundamental step in NLP. This is a crucial stage since the text’s meaning may be deduced from an examination of the words in the text. Tokenization is the process of separating source text into distinct tokens for examination. Tokens are fragments of the original text that have not been reduced to their simplest form. Figure 3 depicts a sample tweet following the application of preprocessing steps.

<figure><img src="image_6.png" /><figcaption>Fig. 3. Sample before and after applying preprocessing steps</figcaption></figure>

## 4.2 Sentiment Labelling

The polarity<fnref n="2" /> is a decimal value ranging from -1 to 1 that measures the intensity of the text's emotion. We generated a polarity value for the collected records

<footnote n="2">² Sentiment analysis with textblob and vader.</footnote>
by TextBlob. In order to determine the polarity (positive or negative) and subjectivity of a given piece of text, it employs a pre-trained Naive Bayes classifier. Positive emotions with polarity values between 0 and 1 are represented by the number 1, whilst negative emotions with polarity values between -1 and 0 are represented by the number -1. A tweet with a polarity rating of 0 is neutral and contains no subjective information. Labeled samples are shown in Fig. 4.

<figure><img src="image_7.png" /><figcaption>Fig. 4. Textblob sentiment on sample tweet</figcaption></figure>

After labeling all tweets in the dataset, we found that 42.86% were positive, 46.72% were negative, and 10.42% were neutral (Fig. 5). This suggests that individuals are not immune to the pandemic lifestyle they have recently experienced. Even though the number of people with positive and negative views seems to be about the same, it has been found that there are more negative views. This means that distance education, which was the main education strategy the government imposed on people during the pandemic, is not well-liked by people.

<figure><img src="image_8.png" /><figcaption>Fig. 5. Sentiment model class distribution</figcaption></figure>
## 4.3 Deep Model

After labeling the data with the unsupervised approach, we evaluated deep learning models to predict the target variable. Then, we developed and trained an algorithm to categorize the emotions of tweets. Using a sequential network, we deployed RNN and 1D-CNN models. We utilized Python version 3.9 and TensorFlow API Core version 2.7 with Keras to generate models<fnref n="3" />. The proposed architecture has been subjected to a categorization of positive, negative, and natural sentiments stated by Twitter users. In the established model, first we incorporated words from tweets into the model's embedding layer. During the training phase, the word embedding layer contained 284,700 parameters for mapping a sequence of word indices (xn) to embedding vectors (varepsilon) and learning the word embedding. The subsequent layers comprise simple RNN units with shapes of 97 × 256 and parameters of 78,592. The last layer consists of three classes arranged in a dense layer. In the final stage, we configured the model using the Softmax activation function and SGD optimizer. The architecture of the proposed RNN-based model is given in detail in Fig. 6.

<figure><img src="image_9.png" /><figcaption>Fig. 6. RNN Model's Architecture used for Twitter sentiment analysis</figcaption></figure>

<footnote n="3">³ Francois Chollet et al. Keras, 2015.</footnote>
The 1D-CNN architecture has been designed as a second model that contains eight 1D convolutional layers in total. Each of the two consecutive convolutional layers uses the same number of units. For each pair of convolutional layers, 64, 128, and 512 units, respectively, were used. The maximum pooling layer has been applied after each of the two convolutional layers. Following the last layer of maximum pooling, a 256-unit dense layer was applied. The last layer has a dense layer with three classes that employ the softmax activation function.

# 5 Experimental Results

Because the primary objective of this study is to develop deep learning models that are capable of analyzing the emotions that individuals have regarding education obtained through distance learning, we have developed a variety of models and built them with accuracy and loss metrics. These two algorithms, one-dimensional Convolutional Neural Networks (1D-CNN) and Recurrent Neural Networks (RNN), produced the best results for us out of all the ones we tested. To evaluate the proposed models' performance, we trained them with 30 epochs. Figures 7 and 8 depict the accuracy and loss scores of the proposed RNN and 1D-CNN models, respectively.

<figure><img src="image_10.png" /><figcaption>Fig. 7. Performance results of RNN model</figcaption></figure>

Table 1 provides an overview of the results of the proposed models' respective performances. The Table reveals that the validation accuracies for the RNN model are 93%, while those for the 1D-CNN model are 92%.

Performances of the two models are similar to each other as it is seen from Table 1. When compared to the performance of proposed models, RNN's training and validation set accuracy values are closer together, indicating that it learned from the training set well and could perform similarly in the validation set.
<figure><img src="image_11.png" /><figcaption>Fig. 8. Performance results of 1D-CNN model</figcaption></figure>

<table><caption>Table 1. Performance metrics of the proposed deep sentiment models</caption><thead><tr><td>Model</td><td>Training Accuracy</td><td>Validation Accuracy</td><td>F1 Score</td></tr></thead><tbody><tr><td>1D-CNN</td><td>0.9420</td><td>0.9243</td><td>0.9420</td></tr><tr><td>RNN</td><td>0.9387</td><td>0.9379</td><td>0.9386</td></tr></tbody></table>

## 6 Conclusion

It will likely take some time to comprehend the true impact of the COVID-19 epidemic. Clearly, it is not difficult to foresee that our lives, altered by the pandemic, will never be the same again. Changes in fundamental areas such as health and education had a profound impact on everyone's lives. In order to comprehend the emotional returns and reflections in the sphere of education, we have developed this study. We evaluated people's tweets to comprehend the implications of shifting education to online platforms and continuing it at home rather than in institutions as a result of COVID-19 and to determine how it impacted daily life. We presented sentiment analysis methodologies for modeling emotions based on Twitter data. Using sophisticated models, we determined the proportions of positive, negative, and neutral posts. In the experiments, the RNN model had the highest performance and accuracy (93.79%). As a consequence of our investigation, we discovered that although the dataset we collected was rather small, there was no apparent consensus among individuals; nonetheless, we did identify the presence of students who viewed the effects of the adjustments as nearly equally favorable and unfavorable.
References

1. Abd-Alrazaq, A., Alhuwail, D., Househ, M., Hamdi, M., Shah, Z.: Top concerns of Tweeters during the COVID-19 pandemic: infoveillance study. J. Med. Internet Res. **22**(4), 19016 (2020). https://doi.org/10.2196/19016

2. Ayaz, T.B., et al.: Global impact of the pandemic on education: a study of natural language processing. In: 2022 Innovations in Intelligent Systems and Applications Conference (ASYU), pp. 1–4. IEEE (2022)

3. Bilen, B., Horasan, F.: LSTM network based sentiment analysis for customer reviews. Politeknik Dergisi **25**, 959–966 (2021). https://doi.org/10.2339/politeknik.844019

4. Chintalapudi, N., Battineni, G., Amenta, F.: Sentimental analysis of COVID-19 tweets using deep learning models. Infect. Dis. Rep. **13**(2), 329–339 (2021)

5. Coletta, L.F.S., da Silva, N.F.F., Hruschka, E.R., Hruschka, E.R.: Combining classification and clustering for tweet sentiment analysis. In: 2014 Brazilian Conference on Intelligent Systems, pp. 210–215 (2014). https://doi.org/10.1109/BRACIS.2014.46

6. Fang, X., Zhan, J.: Sentiment analysis using product review data. J. Big Data **2**(1) (2015). https://doi.org/10.1186/s40537-015-0015-2

7. Gupta, P., Tiwari, R., Robert, N.: Sentiment analysis and text summarization of online reviews: a survey. In: 2016 International Conference on Communication and Signal Processing (ICCSP), pp. 0241–0245 (2016). https://doi.org/10.1109/ICCSP.2016.7754131

8. Jelodar, H., Wang, Y., Orji, R., Huang, S.: Deep sentiment classification and topic discovery on novel coronavirus or COVID-19 online discussions: NLP using LSTM recurrent neural network approach. IEEE J. Biomed. Health Inform. **24**(10), 2733–2742 (2020). https://doi.org/10.1109/JBHI.2020.3001216

9. Li, G., Liu, F.: A clustering-based approach on sentiment analysis. In: 2010 IEEE International Conference on Intelligent Systems and Knowledge Engineering, pp. 331–337 (2010). https://doi.org/10.1109/ISKE.2010.5680859

10. Liu, B.: Sentiment analysis and subjectivity. In: Handbook of Natural Language Processing (2010)

11. World Health Organization: Coronavirus disease 2019 (COVID-19): situation report, 73 (2020)

12. Porreca, A., Scozzari, F., Di Nicola, M.: Using text mining and sentiment analysis to analyse Youtube Italian videos concerning vaccination. BMC Pub. Health **20**(1), 1–9 (2020)

13. Raghupathi, V., Ren, J., Raghupathi, W.: Studying public perception about vaccination: a sentiment analysis of tweets. Int. J. Environ. Res. Public Health **17**(10), 3464 (2020)

14. Rehioui, H., Idrissi, A.: New clustering algorithms for Twitter sentiment analysis. IEEE Syst. J. **14**(1), 530–537 (2020). https://doi.org/10.1109/JSYST.2019.2912759

15. Sadigov, R., Yıldırım, E., Kocaçınar, B., Patlar Akbulut, F., Catal, C.: Deep learning-based user experience evaluation in distance learning. Cluster Comput., 1–13 (2023)

16. Samuel, J., Ali, G.G.M.N., Rahman, M.M., Esawi, E., Samuel, Y.: COVID-19 public sentiment insights and machine learning for Tweets classification. Information **11**(6) (2020). https://doi.org/10.3390/info11060314. www.mdpi.com/2078-2489/11/6/314
17. Sosun, S.D., et al.: Deep sentiment analysis with data augmentation in distance education during the pandemic. In: 2022 Innovations in Intelligent Systems and Applications Conference (ASYU), pp. 1–5. IEEE (2022)

18. Tadesse, A.W., Mihret, S., Biset, G., Muluneh, A.: Psychological impacts of COVID-19 among college students in Dessie town, Amhara region, Ethiopia; cross-sectional study (2020)

19. Xiao, Y., Yin, Y.: Hybrid LSTM neural network for short-term traffic flow prediction. Information **10**, 105 (2019). https://doi.org/10.3390/info10030105

20. Yadav, N., Chatterjee, N.: Text summarization using sentiment analysis for DUC data. In: 2016 International Conference on Information Technology (ICIT), pp. 229–234 (2016). https://doi.org/10.1109/ICIT.2016.054