Next Article in Journal
Digital versus Conventional Workflow in Oral Rehabilitations: Current Status
Next Article in Special Issue
Let AI Perform Better Next Time—A Systematic Review of Medical Imaging-Based Automated Diagnosis of COVID-19: 2020–2022
Previous Article in Journal
The Quantification of Salivary Flow and pH and Stomatognathic System Rehabilitation Interference in Patients with Oral Diseases, Post-Radiotherapy
Previous Article in Special Issue
In Silico Screening of Potential Phytocompounds from Several Herbs against SARS-CoV-2 Indian Delta Variant B.1.617.2 to Inhibit the Spike Glycoprotein Trimer
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

A Deep Learning Approach for Sentiment Analysis of COVID-19 Reviews

School of Engineering and Technology, Central Queensland University, Melbourne, VIC 3000, Australia
School of Business and Law, Central Queensland University, Melbourne, VIC 3000, Australia
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(8), 3709;
Submission received: 10 January 2022 / Revised: 27 March 2022 / Accepted: 29 March 2022 / Published: 7 April 2022
(This article belongs to the Special Issue Artificial Intelligence Computing and Applications for COVID-19)


User-generated multi-media content, such as images, text, videos, and speech, has recently become more popular on social media sites as a means for people to share their ideas and opinions. One of the most popular social media sites for providing public sentiment towards events that occurred during the COVID-19 period is Twitter. This is because Twitter posts are short and constantly being generated. This paper presents a deep learning approach for sentiment analysis of Twitter data related to COVID-19 reviews. The proposed algorithm is based on an LSTM-RNN-based network and enhanced featured weighting by attention layers. This algorithm uses an enhanced feature transformation framework via the attention mechanism. A total of four class labels (sad, joy, fear, and anger) from publicly available Twitter data posted in the Kaggle database were used in this study. Based on the use of attention layers with the existing LSTM-RNN approach, the proposed deep learning approach significantly improved the performance metrics, with an increase of 20% in accuracy and 10% to 12% in precision but only 12–13% in recall as compared with the current approaches. Out of a total of 179,108 COVID-19-related tweets, tweets with positive, neutral, and negative sentiments were found to account for 45%, 30%, and 25%, respectively. This shows that the proposed deep learning approach is efficient and practical and can be easily implemented for sentiment classification of COVID-19 reviews.

1. Introduction

Coronavirus disease (COVID-19) is a worldwide pandemic with negative consequences to human health [1]. It has spread to numerous countries across all continents since its initial discovery in Wuhan, China, and was declared as a pandemic by the World Health Organisation (WHO) on 11 March 2020 [2].
A lot of information on COVID-19 has been posted on various social media. However, there can be misinformation spread in a social media platform like Twitter and understanding people’s sentiment from those textual resources is hence important [2]. Deep learning technologies can be useful for identifying sentiments from Twitter data on information regarding COVID-19. However, there remains a technological challenge as to how deep learning networks can be adopted and modified in this regard to achieve a good level of accuracy especially when considering the complexities entailed in textual analysis.
Bhat et al. [3] find that human sentiments play a vital role to understand their personal feelings. For example, human sentiments evaluator could help organisations what human are feeling confident in buying commodities which they think will be of importance in unprecedented time. Domenico et al. [4] reflect that understanding sentiments on social media can help organisations to revaluate their business architecture as the needs may change based on information and news that consumers are exposed to. A particular source of data that can facilitate such sentiment analysis is the Twitter, and which has also been considered in this paper due to its popularity as a forum for discussions related to COVID-19. Thus, the main objectives of this paper are to: (1) understand the extent deep learning approaches can identify sentiments of human emotions from day to day within lockdown situations, with the tweets categorised as reflecting positive, negative, or neutral sentiments, and (2) explore the various architectures of deep learning approach including different activation functions to evaluate performance and this is an aspect different from previous research.
Earlier studies have presented various approaches for analysing user sentiment in social media data [5,6,7,8,9]. For example, Wang et al. [6] present a hybrid machine learning algorithm to classify user sentiment into negative or positive. Pham and Le [7] apply the natural language processing (NLP) to understand user sentiment in a dataset entailing customer reviews. Aflakparast et al. [8] use a Bayesian graphical model to analyse Twitter information. However, these approaches can be computational complex, time consuming, and do not necessarily provide high accuracy.
Thus, this paper presents a deep learning approach for the sentiment classification of COVID-19 related tweets. Such an analysis of individuals’ comments can help identifying positive and negative emotions, and indeed there is a focus on automatically finding texts with negative emotions in the literature [9,10]. It is common that the rectified linear activation function (ReLU) is used due to low complexity in training and the possibility of achieving superior performance. Most importantly, ReLU is commonly used to study nonlinear dependencies. Several studies have used ReLU in their neural network models due to their ability to assist the convolution neural networks in capturing complex patterns [11]. However, when using the ReLU function, there is a possibility of dying neurons which may limit the learning progress of a neural network. To overcome the limitations in neural networks, several architectures including Long-Short Term Model (LSTM) have been proposed. LSTM has been regarded as an important function as it helps to solve time series and sequential problems with impressive results [12]. Therefore, the proposed deep learning approach implements the LSTM activation function due to its ability to learn text sequence and find the relationship between a word to word or phrase to phrase in sentiment analysis [12]. Furthermore, it improves the semantic information of tweets and makes the learning model efficient. This results in better performance on some datasets as the network is not picking up the right volatility trends in the data as the activation function is not appropriate for the type of data under analysis. Similar studies have been conducted to find feature sets using machine learning SVM [13]. Deep learning approaches with integrated attention mechanism, as proposed in this article, hold high potentials in sentiment analysis and there is a need for further research in this respect.
This paper addresses this research gap, particularly for a COVID-19 related tweet dataset. In addition, the LSTM and recurrent neural networks (LSTM-RNN) using the attention layer for feature mapping are introduced. We explore the approach on a publicly available dataset, containing COVID-19 related tweets, and categorise the Tweets based on various sentiments. The proposed deep learning approach shows a notable performance improvement in terms of accuracy (10%) and precision (10–12%) compared to approaches including Naïve Bayes, Random Forest, Support Vector Machine (SVM), Logistic Regression and LSTM-RNN.
The proposed deep learning approach improves the features weights by attention mechanism with semantic sequencing by LSTM which, to the best of the authors’ knowledge has not been implemented similarly by previous approaches especially in understanding sentiments from COVID-19 related tweets. The main task is to optimise efficient weight by its semantic relation of words using attention learning with LSTM.
This paper is divided into six sections. Section 2 presents the related work which leads to the development of the tweet classification architecture and deep learning approach in Section 3 and Section 4 respectively. Section 5 presents the results and discussion. This is followed by the conclusion in Section 6.

2. Related Work

Several studies have focused on sentiment analysis using machine learning and deep learning approaches in different perspectives [7,12,13,14,15,16,17,18,19]. Pham and Le [7] apply a RNN-based multilayer architecture to capture sentiments from customer reviews of different aspects of products. Their approach is used for analysing 174615 reviews of 1768 hotels from, revealing that it is promising for analysing sentiments and predicting ratings of the hotels [7]. Parimala et al. [14] conduct sentiment classification on tweets related to catastrophe events using a LSTM framework with a word embedding algorithm. They propose a risk assessment sentiment analysis (RASA) algorithm and show that the algorithm outperforms other approaches including XGBoost and binary classifiers [14].
Li et al. [15] use a combination of unsupervised and supervised learning approaches, with the unsupervised model using semantic features to characterise feature transformation for the supervised neural nets. Their approach performs very well in identifying emotions in a social context [15]. Xiong et al. [16] present an integrated approach that jointly conduct sentiment and topic analysis from short texts. Hassan and Mahmood [17] apply a combination of CNN and RNN frameworks for sentiment analysis. To train initial word embeddings, they have used an unsupervised NLP model, pre-trained on a large database; and then they exploit the advantage of CNN’s capability in extracting features and RNN’s ability to capture dependencies to identify sentiments across datasets [17]. The result shows that the approach is capable of increasing classification efficiency significantly [17].
Jongeling et al. [19] explore sentiment analysis tools like SentiStrength, NLTK, Stanford, and Alchemy match manual sentiment labelling. The authors found that none of these tools correspond to manual labelling well [19]. However, NLTK is found to be performing better than SentiStrength [19]. Rani and Singh [20] conduct sentiment analysis through SVM on data collected from Twitter. Extracting features through an implementation of TF-IDF approach, the sentiments are identified using two SVM models and it is found that linear SVM is more accurate than kernel SVM in this respect [20]. Jagdale et al. [21] apply machine learning algorithm to classify reviews that are positive and negative. Arras et al. [22] explore an improved information propagation across neural network layers for sentiment analysis.
Gupta and Joshi [23] use a hybrid approach, involving SentiWordNet (SWN)-based feature vectors and SVM classifier, for sentiment analysis on a Twitter dataset. Du et al. [24] apply hierarchical machine learning to extract sentiments from opinions about HPV vaccines on Twitter and note the hybrid technique of machine learning and lexicon-based approaches as highly efficient. Geetha et al. [25] forecast sensitive tweets on a dataset involving 280,000 tweets and utilising 23 keywords. They use auto-encoders optimised by word embedding strategies, with tweets labelled manually and the sensitivity of the tweets modelled using an RNN with the framework validated using different activation functions like softmax, sigmoid, and ReLU [25]. They note the framework with softmax and ReLU as achieving a high accuracy in recognising tweets of sensitive nature. Hosseini et al. [26] test CNN’s capability in conceptualising semantics from training data and highlight some limitations of the model.
Recently, there has been a significant increase in the use of machine learning to tackle the concerns posed by the recent pandemic [27,28,29,30]. For example, robotics and drone technologies have been used to aid the healthcare system, conduct surveillance and disinfection, among other things [30]. Ghimire et al [27] conduct a systematic study on various AI and the Internet of Things (IoT) approaches for diagnosing, predicting death rate, developing drugs and vaccines, and analysing sentiments linked to COVID-19.
Siedlikowski et al. [28], use Chloe, an AI-based digital information tool developed for COVID-19, to indicate the potential of such systems in proactive collaboration across sectors towards disease management and forming public awareness [28]. Dhakal et al. [29] develop an intelligent voice assistant to assist individuals in self-diagnosing coronavirus symptoms. Khan et al. [30] argue that implementing smart technologies can minimize the detrimental impacts of COVID-19 infection.
Mujahid et al. [31] investigate machine learning approaches along with text processing tools for understanding individuals’ sentiments about e-learning during the lockdown following COVID-19 The results reveal the random forest and SVM classifier as potential classifiers in this respect [31]. Sawik and Płonka [32] present the applicability and potential of various data visualisation tools and applications in various COVID-19 related aspects including location tracking, quarantine management, and travel management.
The discussion above shows that different approaches have been proposed in literature to address COVID-19 related issues, as well as sentiment analysis of social media data. Some of these approaches have applied CNN architecture, which have limitations that can affect its prediction accuracy [26]. There are also other works which cover the potential and limitations of different machine learning approaches and deep learning architectures in various domains further to works exploring the attention mechanisms in deep learning [33,34,35,36,37,38,39,40,41,42,43]. For semantic analysis, using a LSTM-RNN ATTENTION approach can be helpful in better conceptualising word sequence and enhancing performance of classifiers in detecting sentiments. Thus, this paper proposes a deep learning approach for sentiment analysis of COVID-19 related tweets.

3. The Sentiment Classification Architecture

This section presents the sentiment classification architecture for tweet data analysis. The architecture consists of five steps. The first step involves inputting the text dataset of tweets. The next step is to pre-process tweets’ text and reduce noise by reducing unwanted characters and symbols from the text. In the pre-processing step, the text is changed into a value based on its frequency. In the fourth step, feature mapping is performed, and weights assigned by LSTM-RNN mapping features are changed to reduce overlapping between features. Improving weights by using the attention mechanism helps to select relevant information. In the fifth step, a classifier is applied in the proposed approach using a basic softmax classifier. The performance of the proposed approach is measured in terms of its accuracy, precision, and recall. In brief, the main emphasis of the proposed approach is on feature selection or feature engineering by the LSTM-RNN function and attention layer, in which the attention layer assigns efficient weights. The proposed approach and the framework provide efficient ways of selecting and weighting efficient features in nonlinear space. Figure 1 shows the sentiment classification architecture.
Attention layer is useful in deep learning as it can enhance the performance of neural networks and brought many developments in the field [39,41,42]. The LSTM model can capture “long term dependencies” within sequences of words [40]. The attention mechanism allows the layer to emphasise upon a specific part of the input sequence that is highly important [41]. Such a mechanism can be useful when combined with LSTM since that can facilitate focus on parts of sentences or documents upon which textual analysis, like as in this project, is undertaken. The attention mechanism aims at dividing the complex tasks into smaller areas of attention that are further processed in a sequence. The model performs visual attention in the same manner as a human brain does by splitting a complex problem into smaller units and focusing to solve them one by one.
The use of attention mechanisms has been popular in recent years due to its ability to improve the performance of neural networks by focusing on important parts of a sequence and therefore, is widely used in applications like emotion recognition, speech recognition, sentiment analysis, and machine translation [39,41,42]. Another benefit that attention mechanisms offer is that these models can be applied to complex problems flexibly and effectively [41]. By using the attention mechanism, the global information is easily captured by a decoder instead of solely information that is based on a hidden state [41,42].
Such a mechanism, especially when mapping a query, and pairing with output vectors can lead to good classification performance [42].

4. Methodology

This section presents the methodology adopted in this project for both assessing the potential of the proposed deep learning approach and comparing it with other classifiers in sentiment classification of COVID-19 tweets.

4.1. Dataset

COVID-19 tweets were downloaded from the Kaggle website (, accessed on 26 November 2021). The dataset has over 170k tweets, which were collected and tested with the proposed algorithm. The experiment focused on sentiment analysis of tweets to analyse accurate and precise feelings regarding the COVID-19 pandemic. The dataset has different columns, including user id, location, and other details, along with the tweet and ratings from other users, such as the number of users who have tagged the tweet as favourite. Among these, we particularly focus on two aspects—the tweet text and the ratings by users, i.e., the column labelled user favourites.
We converted the user-favourite column into sentiment classes as follows: user_favourite value of 0–100 reviews = negative; 100–2000 reviews = neutral; and 2000 and above reviews = positive. These classification labels, along with the features created, as discussed in the next phase, are the samples fed to the classification models utilised in this experiment.

4.2. Attribute and Train/Test Dataset Formation

The first phase adopted in this experiment entails cleaning and pre-processing the text data to eliminate redundancies by considering the following measures:
  • In both uppercase characters, the formatting is translated into lowercase
  • All internet slangs are removed
  • Removed all the words that can be safely skipped from the list such as a, an, etc.
  • Removed white spaces such as blank and empty spaces between words
  • The redundant terms are compressed such as repetition of words
  • The text of the hash tags is kept as it is
The second phase then concerns feature extraction by (a) listing term occurrence as well as the frequency of term occurrence, and ordering them, and disregarding grammar such as spelling mistakes, and (b) using machine learning classifiers to process the feature vectors. Here, the Term Frequency-Inverse Document Frequency (TF-IDF) is calculated by using, following [5,20,36]:
t f i d f   t ,   d ,   D = t f t ,   d × i d f   t ,   D  
where t f   t ,   d = Term   frequency ; i d f   t ,   D = Inverse   document   frequency .
This results in a matrix, which is split and vectorised into two datasets: the training dataset and test dataset. We then use multiple machine learning classifiers, including deep learning, random forest, and SVM, adopt hyperparameter tuning for the training dataset, and test the classifiers’ performance on the test data.

4.3. Additional Steps in LSTM-RNN

As previously indicated, the purpose of this project is to explore a deep learning architecture involving attention layers to understand sentiment classification accuracy from tweet data. Thus, for the proposed LSTM-RNN architecture, there are some additional processing steps. First is the convolution of features. In this phase, the input COVID-19 tweets are fed into the LSTM-RNN model. This stage aims to extract high-level semantic features from the sequence of words. The LSTM-RNN model also finds the temporal relationship between features and generates feature vectors.
Additionally, we consider the semantic meaning of the tweets and create a secondary set of labels with values assigned to the emotion expressed in those tweets to train the dataset: fear = 0, sad = 1, anger = 2, and joy = 3. Acknowledging that this assignment of emotion labels is subjective, the purpose of doing so is to create a matrix layer that can be fed to LSTM-RNN towards achieving sentiment analysis outcomes.
Figure 2 shows that the RNN model takes the sequence of pixels x = x 1 , x 2 , , x n , produces hidden states H = H 1 , H 2 , , H n , and outputs states O = O 1 , O 2 , , O n in the following way [41,42]:
O t = σ W H t O t + b t
H t = σ W H t 1 H t H t 1 + W x t H t x t + b H t
Here, W H t O t represents the vector from the hidden unit H t and output unit O t , H t 1 represents the hidden unit for a t 1 pixel sequence, W H t 1 H t is a weight vector from the hidden unit H t 1 to H t for the sequence time t , and b H t and b t are biases.
Figure 2 above presents a graphical model for RNN and proposed changes to indicate the improved part of the LSTM-RNN. Furthermore, the LSTM stack can be used to learn the time sequence features in which the model learns the problems comprised of a single series of observation and a model is required to learn from the series of past observations to predict the next value in sequence [12,35]:
i g t = tan h ( W x t i g t x t + W H t 1 i g t H t 1 + b i g t )
p t = σ W x t p t x t + W H t 1 p t H t 1 + b p t
f g t = σ W x t f g t x t + W H t 1 f g t H t 1 + b f g t
o p t = σ W x t o p t x t + W H t 1 o p t H t 1 + b o p t
C e t = c e t 1 f g t + i g t p t
H t = t a n h C e t o p t  
where i g t represents the input gate, p t indicates the prediction in starting layers, f g t represents the forget gate, H t provides information on output, b i g , b p , b f g ,   b o p are bias vectors, C e t indicates the state of the cell, and W x x is the weight matrix. Both RNN and LSTM models can be combined to extract semantic features from the input tweets.
Notably, in the experimentation, we apply attention layer for improving the learning from features and improving the feature weights, as also noted in [39]. LSTM-RNN is used for learning sequence of sentences and generating features weighted by attention process. Further the use of secondary labels combined with LSTM-RNN facilitate the increase of domain knowledge in the learning process. As indicated in the literature [41], the focus function of the attention layer tests weight distribution and estimates an array for the different layers. Thus from Xi as input, f(Xi, Xi+1) are the features generated from the second layer and f(Xi, Xi+1,· · ·, Xi + L − 1) from the L-th layer. These feature values indicate the responses of multi-scale n-grams [23,41], i.e., unigram Xi, bigram Xi Xi+1. and L-gram Xi Xi+1· · · Xi + L − 1. In the focus mechanism, the filtered ensemble and reweight scale are used in unison [41,43]. In addition, scale reweight is used to compute SoftMax distribution of attention weights using the descriptors as data, and outputs weighted attribute weights for reweighing [41,42].
S l i = F L e n s m X l i
X a t t e n i = j = i L α L i X L i
i L = S o f t m a x M L P X a t t e n i
Three performance metrics, namely, accuracy, precision, and recall, are used to measure the performance of the proposed deep learning approach.In the proposed approach, the novelty is the improvement in feature weighting by using the attention layer mechanism. The proposed approach retrieves text data from a sequence mapped by LSTM-RNN; the LSTM generates a sequence of annotations for each input. The vectors used in this work are basically the concatenation of hidden states in the encoder, and then features are refined by the attention layer mechanism. The attention mechanism helps in feature weighting, and this is further improved by the softmax activation function.

4.4. Accuracy

Accuracy is represented by:
Accuracy = Po + Ne Po + Ne + Fpo + FNe
where Po represents rightly labelled positive samples, Ne represents negative samples properly labeled, Fpo represents incorrectly categorised negative samples, and FNe represents incorrectly categorised positive samples.

4.5. Precision

Precision is represented by:
Precision = Po Po + Fpo  

4.6. Recall

Recall is represented by:
Recall = Po Po + FNe  

5. Results and Discussion

This study considers three classification techniques: SVM, random forest, and the proposed approach using the attention layer. The parameters of the classifiers are tuned using grid search.
Table 1 shows the parameter tuning outcomes of SVM-RBF, which has two central hyperparameters: C and gamma. These parameters balance generalisation and overfitting. The gamma value helps in reducing the curvature; otherwise, the data accumulation will increase, which will reduce the polynomiality of the learning process. To reduce this overfitting and data mugging, less curvature is balanced by a lower C value. Table 1 shows that low gamma and high C generated better performance compared to others. The SVM hyperparameter tuning shows that at C = 10 and gamma = 0.01, the accuracy is 62.13%, precision is 63.12%, recall is 62%, and F-score is 63%, which is the best model for this classifier for the considered parameters.
Table 2 shows hyperparameter tuning of random forest. The hyperparameters considered are max depth, estimators, and split. These parameters denote the depth of trees, the maximum number of trees generated during the model development, and the minimum number of data points in nodes before a split occurs. As noted in the table, when the minimum split is 5, the maximum depth is 10, and the number of estimators is 600, the model’s accuracy is 60%, precision is 61%, recall is 62%, and F-score is 60%. This is the best model for the variation of parameters considered.
Table 3 similarly shows hyperparameter tuning for attention layers with Leaky ReLU as the activation function and with different numbers of attention layers. In these experiments, the number of CNN layers was fixed because CNN layers increase resource usage exponentially. The number of attention layers varies from 1 to 8. As noted in the table, the model’s performance increases when the number of attention layers increases from 1 to 4, after which the performance degrades. For an attention layer number of 4, the model’s accuracy is 86.12%, precision is 84.23%, recall is 85.23%, and F-score is 85.12%. This performance is better than the other observed results. Table 3 shows that the best deep learning approach is based on the network with four attention layers, which provides the best accuracy, precision, recall, and F-score.
Table 4 shows the activation function results, which clearly show that four attention layers with the activation function Leaky ReLU provided higher accuracy, precision, recall, and F-score in comparison to other activation functions. It can be seen that for the Leaky ReLU activation function, the accuracy is 85.12%, precision is 82.12%, recall is 84.13%, and F-score is 84.12%, which is considerably higher than the accuracy shown by ReLU, which is 84.56% with a precision of 82.34%, recall of 82.12%, and F-score of 81.23%. It can be observed that Leaky ReLU has better accuracy, recall, and F-score results compared to other activation functions considered: TANH, sigmoid, and ReLU. Leaky ReLU is an activation function that influences forward and backward training in LSTM-RNN and controls error using a backpropagation approach. This mechanism potentially has a direct impact on the proposed model’s classification performance and error reduction.
We further tested the hyperparameter tuning of our proposed approach with four attention layers and Leaky ReLU using epochs to determine which hyperparameters provide the best results. Table 5 and Figure 3 show that epoch 18 generated the best results.
In Table 6, we compare the proposed approaches with other machine learning and deep learning approaches, including the naïve Bayes, logistic regression, and LSTM-RNN with the base hyperparameters, SVM, and random forest with the best-identified hyperparameters. In comparison, the proposed deep learning approach was found to perform better than the other existing approaches, with an accuracy of 84.56%, precision of 82.34%, recall of 82.12%, and F-score value of 81.23%.

6. Conclusions

Over the years, several approaches have been developed for sentiment analysis of social media data. This sentiment analysis process is usually complex and time-consuming due to the huge amount of data and the requirement to achieve a high level of accuracy. Thus, this paper presents a deep learning approach for sentiment analysis of Twitter data on COVID-19 reviews. The algorithm is based on an LSTM-RNN-based network and enhanced featured weighting by an attention layer. This algorithm uses an enhanced feature transformation framework via the attention mechanism. A total of four class labels (sad, joy, fear, and anger) from publicly available Twitter data posted in the Kaggle database were used in this study. In comparison with current approaches, the proposed deep learning approach significantly improved the performance metrics, with increases of 20% in accuracy and 10% to 12% in precision but only 12–13% in recall. Out of a total of 179,108 COVID-19-related tweets, tweets with positive, neutral, and negative sentiments were found to account for 45%, 30%, and 25%, respectively. Overall, the proposed deep learning approach is found to be efficient and practical and can be easily implemented for sentiment classification of COVID-19 reviews.
This study provides theoretical and practical implications. For theoretical implications, this study applies a deep learning approach for sentiment analysis of individuals from Twitter data on information regarding COVID-19. This deep learning approach can be further applied to sentiment analysis of a general decision-making problem in various industries such as marketing, government, service and academic. The implication of this study is evident also from the recent COVID-19 situations when information expressed over the social media have affected public sentiments [44]. For such practical implications, this study suggests that the proposed deep learning approach can be adopted and modified for achieving a good level of accuracy especially when considering the complexities entailed in textual analysis.
This study is not free from limitations. Feature weighting and feature mapping were applied to the original dataset, and other features that are noisy, as well as a combination of these factors, may affect the classification outcomes. In future work, the deep learning approach can be designed to optimise the features in an iterative process. It can also be enhanced to work so that topic detection and sentiment classification are performed simultaneously.

Author Contributions

Conceptualization, all authors; methodology, C.S.; software, C.S.; validation, C.S.; formal analysis, C.S.; investigation, C.S.; resources, C.S; data curation, C.S.; writing—original draft preparation, C.S.; writing—review and editing, all authors; visualization, C.S.; supervision, T.I., S.W. and S.G.; project administration, C.S.; funding acquisition, C.S. All authors have read and agreed to the published version of the manuscript.


This research received no external funding.

Data Availability Statement

Data used in this research is available from the Kaggle (, accessed on 8 January 2022).

Conflicts of Interest

The authors declare no conflict of interest.


  1. Chakraborty, K.; Bhatia, S.; Bhattacharyya, S.; Platos, J.; Bag, R.; Hassanien, A. Sentiment analysis of COVID-19 tweets by deep learning classifiers–A study to show how popularity is affecting accuracy in social media. Appl. Soft Comput. 2020, 97, 106754. [Google Scholar] [CrossRef] [PubMed]
  2. Naw, N. Twitter sentiment analysis using support vector machine and K-NN classifiers. IJSRP 2018, 8, 407–411. [Google Scholar] [CrossRef]
  3. Bhat, M.; Qadri, M.; Noor-ul Asrar Beg, M.K.; Ahanger, N.; Agarwal, B. Sentiment analysis of social media response on the COVID-19 outbreak. Brain Behav. Immun. 2020, 87, 136–137. [Google Scholar] [CrossRef]
  4. di Domenico, G.; Sit, J.; Ishizaka, A. Nunan Fake news, social media and marketing: A systematic review. J. Bus. Res. 2021, 124, 329–341. [Google Scholar] [CrossRef]
  5. Singh, C.; Wibowo, S.; Grandhi, S. An integrated non-linear deep learning method for sentiment classification of online reviews. In Advances in Natural Computation, Fuzzy Systems and Knowledge Discovery; Meng, H., Lei, T., Li, M., Li, K., Xiong, N., Wang, L., Eds.; Springer: Cham, Switzerland, 2020; pp. 1–8. [Google Scholar]
  6. Wang, Y.; Wang, M.; Xu, W. A sentiment-enhanced hybrid recommender system for movie recommendation: An extensive data analytics framework. Wirel. Commun. Mob. Comput. 2018, 2018, 8263704. [Google Scholar] [CrossRef] [Green Version]
  7. Pham, D.-H.; Le, A.-C. Learning multiple layers of knowledge representation for aspect-based sentiment analysis. Data Knowl. Eng. 2018, 114, 26–39. [Google Scholar] [CrossRef]
  8. Aflakparast, M.; de Gunst, M.; van Wieringen, W. Analysis of twitter data with the bayesian fused graphical lasso. PLoS ONE 2020, 15, e0235596. [Google Scholar] [CrossRef]
  9. Schmidt, A.; Wiegand, M. A survey on hate speech detection using natural language processing. In Proceedings of the Fifth International Workshop on Natural Language Processing for Social Media, Valencia, Spain, 3 April 2017. [Google Scholar]
  10. Jnoub, N.; Al Machot, F.; Klas, W. A domain-independent classification model for sentiment analysis using neural models. Appl. Sci. 2020, 10, 6221. [Google Scholar] [CrossRef]
  11. Jianqiang, Z.; Xiaolin, G.; Xuejun, Z. Deep convolution neural networks for twitter sentiment analysis. IEEE Access 2020, 6, 23253–23260. [Google Scholar] [CrossRef]
  12. Singh, C.; Wibowo, S.; Grandhi, S. A deep learning approach for human face sentiment classification. In Proceedings of the 2021 21st ACIS International Semi-Virtual Winter Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing, SNPD-Winter 2021, Ho Chi Minh City, Vietnam, 28–30 January 2021; pp. 28–32. [Google Scholar]
  13. Han, J.; Qian, K.; Song, M.; Yang, Z.; Ren, Z.; Liu, S.; Li, X. An early study on intelligent analysis of speech under COVID-19: Severity, sleep quality, fatigue, and anxiety. arXiv 2020, arXiv:2005.00096. [Google Scholar]
  14. Parimala, M.; Priya, R.M.S.; Reddy, M.P.K.; Chowdhary, C.L.; Poluru, R.K.; Khan, S. Spatiotemporal-based sentiment analysis on tweets for risk assessment of event using deep learning approach. Softw. Pract. Exp. 2021, 51, 550–570. [Google Scholar] [CrossRef]
  15. Li, X.; Rao, Y.; Xie, H.; Lau, R.; Yin, J.; Wang, F. Bootstrapping social emotion classifcation with semantically rich hybrid neural networks. IEEE Trans. Afect. Comput. 2017, 8, 428–442. [Google Scholar] [CrossRef]
  16. Xiong, S.; Wang, K.; Ji, D.; Wang, B. A short text sentiment-topic model for product reviews. Neurocomputing 2018, 297, 94–102. [Google Scholar] [CrossRef]
  17. Hassan, A.; Mahmood, A. Convolutional recurrent deep learning model for sentence classification. IEEE Access 2018, 6, 13949–13957. [Google Scholar] [CrossRef]
  18. Preethi, G.; Krishna, P.; Mohammad, S.; Obaidat, V.; Sartha, V.; Yenduri, S. Application of deep learning to sentiment analysis for recommender system on cloud. In Proceedings of the International Conference on Computer, Information and Telecommunication Systems, Dalian, China, 21–23 July 2017. [Google Scholar]
  19. Jongeling, R.; Sarkar, P.; Datta, S.; Serebrenik, A. On negative results when using sentiment analysis tools for software engineering research. Empir. Softw. Eng. 2017, 22, 2543–2584. [Google Scholar] [CrossRef] [Green Version]
  20. Rani, S.; Singh, J. Sentiment analysis of Tweets using support vector machine. Int. J. Comput. Sci. Mob. Appl. 2017, 5, 83–91. [Google Scholar]
  21. Jagdale, R.S.; Shirsat, V.S.; Deshmukh, S.N. Sentiment analysis on product reviews using machine learning techniques. In Cognitive Informatics and Soft Computing; Springer: Singapore, 2019; pp. 639–647. [Google Scholar]
  22. Arras, L.; Montavon, G.; Müller, K.R.; Samek, W. Explaining recurrent neural network predictions in sentiment analysis. arXiv 2017, arXiv:1706.07206. [Google Scholar]
  23. Gupta, I.; Joshi, N. Enhanced Twitter sentiment analysis using hybrid approach and by accounting local contextual semantic. J. Intell. Syst. 2019, 29, 1611–1625. [Google Scholar] [CrossRef]
  24. Du, J.; Xu, Y.; Song, H.; Tao, C. Leveraging machine learning-based approaches to assess human papilloma virus vaccination sentiment trends with Twitter data. BMC Med. 2017, 17, 69. [Google Scholar]
  25. Geetha, R.; Karthika, S.; Mohanavalli, S. Tweet classification using deep learning approach to predict sensitive personal data. In Advances in Electrical and Computer Technologies; Springer: Singapore, 2020; pp. 171–180. [Google Scholar]
  26. Hosseini, H.; Xiao, B.; Jaiswal, M.; Poovendran, R. On the limitation of convolutional neural networks in recognizing negative images. In Proceedings of the 16th IEEE International Conference on Machine Learning and Applications (ICMLA), Cancun, Mexico, 18–21 December 2017; pp. 352–358. [Google Scholar] [CrossRef] [Green Version]
  27. Ghimire, S.; Thapa, A.K.; Jha, A.; Kumar, A.; Kumar, A.; Adhikari, S. AI and IoT solutions for tackling COVID-19 pandemic. In Proceedings of the 4th International Conference on Electronics, Communication and Aerospace Technology (ICECA), Coimbatore, India, 5–7 November 2020; pp. 1083–1092. [Google Scholar]
  28. Siedlikowski, S.; Noël, L.P.; Moynihan, S.A.; Robin, M. Chloe for COVID-19: Evolution of an intelligent conversational agent to address infodemic management needs during the COVID-19 pandemic. J. Med. Intern. Res. 2021, 23, e27283. [Google Scholar] [CrossRef]
  29. Dhakal, P.; Damacharla, P.; Javaid, A.Y.; Vege, H.K.; Devabhaktuni, V.K. IVACS: Intelligent voice assistant for coronavirus disease (COVID-19) self-assessment. In Proceedings of the 2020 International Conference on Artificial Intelligence & Modern Assistive Technology (ICAIMAT), Riyadh, Saudi Arabia, 24–26 November 2020; pp. 1–6. [Google Scholar]
  30. Khan, H.; Kushwah, K.K.; Singh, S.; Urkude, H.; Maurya, M.R.; Sadasivuni, K.K. Smart technologies driven approaches to tackle COVID-19 pandemic: A review. Biotech 2021, 11, 50. [Google Scholar] [CrossRef] [PubMed]
  31. Mujahid, M.; Lee, E.; Rustam, F.; Washington, P.B.; Ullah, S.; Reshi, A.A.; Ashraf, I. Sentiment analysis and topic modeling on Tweets about online education during COVID-19. Appl. Sci. 2021, 11, 8438. [Google Scholar] [CrossRef]
  32. Sawik, B.; Płonka, J. Project and prototype of mobile application for monitoring the global COVID-19 epidemiological situation. Int. J. Environ. Res. Public Health 2022, 19, 1416. [Google Scholar] [CrossRef] [PubMed]
  33. Ilho, R.; Sarmento, R.M.; Holanda, G.B.; Lima, D.D. New approach to detect and classify stroke in skull CT images via analysis of brain tissue densities. Comput. Meth. Prog. Biomed. 2017, 148, 27–43. [Google Scholar]
  34. Karthik, R.; Gupta, U.; Jha, A.; Rajalakshmi, R.; Menaka, R. A deep supervised approach for ischemic lesion segmentation from multimodal MRI using fully convolutional network. Appl. Soft Comput. 2019, 84, 105685. [Google Scholar] [CrossRef]
  35. Vijayaprabakaran, K.; Sathiyamurthy, K. Towards activation function search for long short-term model network: A differential evolution-based approach. J. King Saud Uni. Comput. Inform. Sci. 2020; in press. [Google Scholar]
  36. Rustam, F.; Khalid, M.; Aslam, W.; Rupapara, V.; Mehmood, A.; Choi, G. A performance comparison of supervised machine learning models for Covid-19 tweets sentiment analysis. PLoS ONE 2021, 16, 4–17. [Google Scholar] [CrossRef]
  37. Dong, X.; de Mel, G. A helping hand: Transfer learning for deep sentiment analysis. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, 15–20 July 2018. [Google Scholar]
  38. Baboota, R.; Kaur, H. Predictive analysis and modelling football results using machine learning approach for English premier league. Int. J. Forecast. 2019, 35, 741–755. [Google Scholar] [CrossRef]
  39. Liu, N.; Shen, B.; Zhang, Z.; Zhang, Z.; Mi, K. Attention-based sentiment reasoner for aspect-based sentiment analysis. Hum. Comput. Inform. Sci. 2019, 9, 35. [Google Scholar] [CrossRef]
  40. Rehman, A.; Malik, B.; Raza; Ali, W. A hybrid CNN-LSTM model for improving accuracy of movie reviews sentiment analysis. Multimed. Tools Appl. 2019, 78, 26597–26613. [Google Scholar] [CrossRef]
  41. Hernández, A.; Amigó, J.M. Attention mechanisms and their applications to complex systems. Entropy 2021, 23, 283. [Google Scholar] [CrossRef] [PubMed]
  42. Kardakis, S.; Perikos, I.; Grivokostopoulou, F.; Hatzilygeroudis, I. Examining attention mechanisms in deep learning models for sentiment analysis. Appl. Sci. 2021, 11, 3883. [Google Scholar] [CrossRef]
  43. Pandey, C.; Rajpoot, D.S.; Saraswat, M. Twitter sentiment analysis using hybrid cuckoo search method. Inform. Process. Manag. 2017, 53, 764–779. [Google Scholar] [CrossRef]
  44. Depoux, A.; Martin, S.; Karafillakis, E.; Preet, R.; Wilder-Smith, A.; Larson, H. The pandemic of social media panic travels faster than the COVID-19 outbreak. J. Travel Med. 2020, 27, taaa031. [Google Scholar] [CrossRef] [PubMed] [Green Version]
Figure 1. Tweet classification architecture.
Figure 1. Tweet classification architecture.
Applsci 12 03709 g001
Figure 2. A graphical model of RNN and proposed changes.
Figure 2. A graphical model of RNN and proposed changes.
Applsci 12 03709 g002
Figure 3. Performance of the deep learning approach on epoch tuning.
Figure 3. Performance of the deep learning approach on epoch tuning.
Applsci 12 03709 g003
Table 1. SVM hyperparameter tuning.
Table 1. SVM hyperparameter tuning.
Table 2. Random forest hyperparameter tuning.
Table 2. Random forest hyperparameter tuning.
Max DepthEstimatorsmin SplitAccuracyPrecisionRecallF-Score
Table 3. Leaky ReLU performance with different attention layers.
Table 3. Leaky ReLU performance with different attention layers.
CNN-LayerActivation FunctionAttention LayersAccuracyPrecisionRecallF-Score
4Leaky Relu181.2380.2379.1280
4Leaky Relu285.1282.1284.1384.12
4Leaky Relu383.1284.2380.1283.23
4Leaky Relu486.1284.2385.2385.12
4Leaky Relu581.2382.1281.2382.12
4Leaky Relu680.1282.128079
4Leaky Relu778.1270.237070
4Leaky Relu880.128079.1276.12
Table 4. Comparison of different activation functions.
Table 4. Comparison of different activation functions.
Convolution LayersActivation FunctionAttention LayersAccuracyPrecisionRecallF-Score
4LEAKY RELU485.1282.1284.1384.12
Table 5. Epoch tuning.
Table 5. Epoch tuning.
Table 6. Results of the proposed approach in comparison to other existing approaches.
Table 6. Results of the proposed approach in comparison to other existing approaches.
Naive Bayes6768.1269.2368
Random Forest60616260
Logistic Regression70.1269.1237067.12
Proposed Approach84.5682.3482.1281.23
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Singh, C.; Imam, T.; Wibowo, S.; Grandhi, S. A Deep Learning Approach for Sentiment Analysis of COVID-19 Reviews. Appl. Sci. 2022, 12, 3709.

AMA Style

Singh C, Imam T, Wibowo S, Grandhi S. A Deep Learning Approach for Sentiment Analysis of COVID-19 Reviews. Applied Sciences. 2022; 12(8):3709.

Chicago/Turabian Style

Singh, Chetanpal, Tasadduq Imam, Santoso Wibowo, and Srimannarayana Grandhi. 2022. "A Deep Learning Approach for Sentiment Analysis of COVID-19 Reviews" Applied Sciences 12, no. 8: 3709.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop