Information

  • Author Services

Initiatives

You are accessing a machine-readable page. In order to be human-readable, please install an RSS reader.

All articles published by MDPI are made immediately available worldwide under an open access license. No special permission is required to reuse all or part of the article published by MDPI, including figures and tables. For articles published under an open access Creative Common CC BY license, any part of the article may be reused without permission provided that the original article is clearly cited. For more information, please refer to https://www.mdpi.com/openaccess .

Feature papers represent the most advanced research with significant potential for high impact in the field. A Feature Paper should be a substantial original Article that involves several techniques or approaches, provides an outlook for future research directions and describes possible research applications.

Feature papers are submitted upon individual invitation or recommendation by the scientific editors and must receive positive feedback from the reviewers.

Editor’s Choice articles are based on recommendations by the scientific editors of MDPI journals from around the world. Editors select a small number of articles recently published in the journal that they believe will be particularly interesting to readers, or important in the respective research area. The aim is to provide a snapshot of some of the most exciting work published in the various research areas of the journal.

Original Submission Date Received: .

  • Active Journals
  • Find a Journal
  • Proceedings Series
  • For Authors
  • For Reviewers
  • For Editors
  • For Librarians
  • For Publishers
  • For Societies
  • For Conference Organizers
  • Open Access Policy
  • Institutional Open Access Program
  • Special Issues Guidelines
  • Editorial Process
  • Research and Publication Ethics
  • Article Processing Charges
  • Testimonials
  • Preprints.org
  • SciProfiles
  • Encyclopedia

applsci-logo

Article Menu

research paper on sentiment analysis of twitter data

  • Subscribe SciFeed
  • Recommended Articles
  • Google Scholar
  • on Google Scholar
  • Table of Contents

Find support for a specific problem in the support section of our website.

Please let us know what you think of our products and services.

Visit our dedicated information section to learn more about MDPI.

JSmol Viewer

A survey of sentiment analysis: approaches, datasets, and future research.

research paper on sentiment analysis of twitter data

1. Introduction

  • A comprehensive overview of the state-of-the-art studies on sentiment analysis, which are categorized as conventional machine learning, deep learning, and ensemble learning, with a focus on the preprocessing techniques, feature extraction methods, classification methods, and datasets used, as well as the experimental results.
  • An in-depth discussion of the commonly used sentiment analysis datasets and their challenges, as well as a discussion about the limitations of the current works and the potential for future research in this field.

2. Sentiment Analysis Algorithms

2.1. machine learning approach, 2.2. deep learning approach, 3. ensemble learning approach, 4. sentiment analysis datasets, 4.1. internet movie database (imdb), 4.2. twitter us airline sentiment, 4.3. sentiment140, 4.4. semeval-2017 task 4, 5. limitations and future research prospects.

  • Poorly Structured and Sarcastic Texts: Many sentiment analysis methods rely on structured and grammatically correct text, which can lead to inaccuracies in analyzing informal and poorly structured texts, such as social media posts, slang, and sarcastic comments. This is because the sentiments expressed in these types of texts can be subtle and require contextual understanding beyond surface-level analysis.
  • Coarse-Grained Sentiment Analysis: Although positive, negative, and neutral classes are commonly used in sentiment analysis, they may not capture the full range of emotions and intensities that a person can express. Fine-grained sentiment analysis, which categorizes emotions into more specific categories such as happy, sad, angry, or surprised, can provide more nuanced insights into the sentiment expressed in a text.
  • Lack of Cultural Awareness: Sentiment analysis models trained on data from a specific language or culture may not accurately capture the sentiments expressed in texts from other languages or cultures. This is because the use of language, idioms, and expressions can vary widely across cultures, and a sentiment analysis model trained on one culture may not be effective in analyzing sentiment in another culture.
  • Dependence on Annotated Data: Sentiment analysis algorithms often rely on annotated data, where humans manually label the sentiment of a text. However, collecting and labeling a large dataset can be time-consuming and resource-intensive, which can limit the scope of analysis to a specific domain or language.
  • Shortcomings of Word Embeddings: Word embeddings, which are a popular technique used in deep learning-based sentiment analysis, can be limited in capturing the complex relationships between words and their meanings in a text. This can result in a model that does not accurately represent the sentiment expressed in a text, leading to inaccuracies in analysis.
  • Bias in Training Data: The training data used to train a sentiment analysis model can be biased, which can impact the model’s accuracy and generalization to new data. For example, a dataset that is predominantly composed of texts from one gender or race can lead to a model that is biased toward that group, resulting in inaccurate predictions for texts from other groups.
  • Fine-Grained Sentiment Analysis: The current sentiment analysis models mainly classify the sentiment into three coarse classes: positive, negative, and neutral. However, there is a need to extend this to a fine-grained sentiment analysis, which consists of different emotional intensities, such as strongly positive, positive, neutral, negative, and strongly negative. Researchers can explore various deep learning architectures and techniques to perform fine-grained sentiment analysis. One such approach is to use hierarchical attention networks that can capture the sentiment expressed in different parts of a text at different levels of granularity.
  • Sentiment Quantification: Sentiment quantification is an important application of sentiment analysis. It involves computing the polarity distributions based on the topics to aid in strategic decision making. Researchers can develop more advanced models that can accurately capture the sentiment distribution across different topics. One way to achieve this is to use topic modeling techniques to identify the underlying topics in a corpus of text and then use sentiment analysis to compute the sentiment distribution for each topic.
  • Handling Ambiguous and Sarcastic Texts: Sentiment analysis models face challenges in accurately detecting sentiment in ambiguous and sarcastic texts. Researchers can explore the use of reinforcement learning techniques to train models that can handle ambiguous and sarcastic texts. This involves developing models that can learn from feedback and adapt their predictions accordingly.
  • Cross-lingual Sentiment Analysis: Currently, sentiment analysis models are primarily trained on English text. However, there is a growing need for sentiment analysis models that can work across multiple languages. Cross-lingual sentiment analysis would help to better understand the sentiment expressed in different languages, making sentiment analysis accessible to a larger audience. Researchers can explore the use of transfer learning techniques to develop sentiment analysis models that can work across multiple languages. One approach is to pretrain models on large multilingual corpora and then fine-tune them for sentiment analysis tasks in specific languages.
  • Sentiment Analysis in Social Media: Social media platforms generate huge amounts of data every day, making it difficult to manually process the data. Researchers can explore the use of domain-specific embeddings that are trained on social media text to improve the accuracy of sentiment analysis models. They can also develop models that can handle noisy or short social media text by incorporating contextual information and leveraging user interactions.

6. Conclusions

Author contributions, institutional review board statement, informed consent statement, data availability statement, conflicts of interest.

  • Ligthart, A.; Catal, C.; Tekinerdogan, B. Systematic reviews in sentiment analysis: A tertiary study. Artif. Intell. Rev. 2021 , 54 , 4997–5053. [ Google Scholar ] [ CrossRef ]
  • Dang, N.C.; Moreno-García, M.N.; De la Prieta, F. Sentiment analysis based on deep learning: A comparative study. Electronics 2020 , 9 , 483. [ Google Scholar ] [ CrossRef ] [ Green Version ]
  • Chakriswaran, P.; Vincent, D.R.; Srinivasan, K.; Sharma, V.; Chang, C.Y.; Reina, D.G. Emotion AI-driven sentiment analysis: A survey, future research directions, and open issues. Appl. Sci. 2019 , 9 , 5462. [ Google Scholar ] [ CrossRef ] [ Green Version ]
  • Jung, Y.G.; Kim, K.T.; Lee, B.; Youn, H.Y. Enhanced Naive Bayes classifier for real-time sentiment analysis with SparkR. In Proceedings of the 2016 IEEE International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Republic of Korea, 19–21 October 2016; pp. 141–146. [ Google Scholar ]
  • Athindran, N.S.; Manikandaraj, S.; Kamaleshwar, R. Comparative analysis of customer sentiments on competing brands using hybrid model approach. In Proceedings of the 2018 IEEE 3rd International Conference on Inventive Computation Technologies (ICICT), Coimbatore, India, 15–16 November 2018; pp. 348–353. [ Google Scholar ]
  • Vanaja, S.; Belwal, M. Aspect-level sentiment analysis on e-commerce data. In Proceedings of the 2018 IEEE International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 11–12 July 2018; pp. 1275–1279. [ Google Scholar ]
  • Iqbal, N.; Chowdhury, A.M.; Ahsan, T. Enhancing the performance of sentiment analysis by using different feature combinations. In Proceedings of the 2018 IEEE International Conference on Computer, Communication, Chemical, Material and Electronic Engineering (IC4ME2), Rajshahi, Bangladesh, 8–9 February 2018; pp. 1–4. [ Google Scholar ]
  • Rathi, M.; Malik, A.; Varshney, D.; Sharma, R.; Mendiratta, S. Sentiment analysis of tweets using machine learning approach. In Proceedings of the 2018 IEEE Eleventh International Conference on Contemporary Computing (IC3), Noida, India, 2–4 August 2018; pp. 1–3. [ Google Scholar ]
  • Tariyal, A.; Goyal, S.; Tantububay, N. Sentiment Analysis of Tweets Using Various Machine Learning Techniques. In Proceedings of the 2018 IEEE International Conference on Advanced Computation and Telecommunication (ICACAT), Bhopal, India, 28–29 December 2018; pp. 1–5. [ Google Scholar ]
  • Hemakala, T.; Santhoshkumar, S. Advanced classification method of twitter data using sentiment analysis for airline service. Int. J. Comput. Sci. Eng. 2018 , 6 , 331–335. [ Google Scholar ] [ CrossRef ]
  • Rahat, A.M.; Kahir, A.; Masum, A.K.M. Comparison of Naive Bayes and SVM Algorithm based on sentiment analysis using review dataset. In Proceedings of the 2019 IEEE 8th International Conference System Modeling and Advancement in Research Trends (SMART), Moradabad, India, 22–23 November 2019; pp. 266–270. [ Google Scholar ]
  • Makhmudah, U.; Bukhori, S.; Putra, J.A.; Yudha, B.A.B. Sentiment Analysis of Indonesian Homosexual Tweets Using Support Vector Machine Method. In Proceedings of the 2019 IEEE International Conference on Computer Science, Information Technology, and Electrical Engineering (ICOMITEE), Jember, Indonesia, 16–17 October 2019; pp. 183–186. [ Google Scholar ]
  • Wongkar, M.; Angdresey, A. Sentiment analysis using Naive Bayes Algorithm of the data crawler: Twitter. In Proceedings of the 2019 IEEE Fourth International Conference on Informatics and Computing (ICIC), Semarang, Indonesia, 16–17 October 2019; pp. 1–5. [ Google Scholar ]
  • Madhuri, D.K. A machine learning based framework for sentiment classification: Indian railways case study. Int. J. Innov. Technol. Explor. Eng. (IJITEE) 2019 , 8 , 441–445. [ Google Scholar ]
  • Gupta, A.; Singh, A.; Pandita, I.; Parashar, H. Sentiment analysis of Twitter posts using machine learning algorithms. In Proceedings of the 2019 IEEE 6th International Conference on Computing for Sustainable Global Development (INDIACom), New Delhi, India, 13–15 March 2019; pp. 980–983. [ Google Scholar ]
  • Prabhakar, E.; Santhosh, M.; Krishnan, A.H.; Kumar, T.; Sudhakar, R. Sentiment analysis of US Airline Twitter data using new AdaBoost approach. Int. J. Eng. Res. Technol. (IJERT) 2019 , 7 , 1–6. [ Google Scholar ]
  • Hourrane, O.; Idrissi, N. Sentiment Classification on Movie Reviews and Twitter: An Experimental Study of Supervised Learning Models. In Proceedings of the 2019 IEEE 1st International Conference on Smart Systems and Data Science (ICSSD), Rabat, Morocco, 3–4 October 2019; pp. 1–6. [ Google Scholar ]
  • AlSalman, H. An improved approach for sentiment analysis of arabic tweets in twitter social media. In Proceedings of the 2020 IEEE 3rd International Conference on Computer Applications & Information Security (ICCAIS), Riyadh, Saudi Arabia, 19–21 March 2020; pp. 1–4. [ Google Scholar ]
  • Saad, A.I. Opinion Mining on US Airline Twitter Data Using Machine Learning Techniques. In Proceedings of the 2020 IEEE 16th International Computer Engineering Conference (ICENCO), Cairo, Egypt, 29–30 December 2020; pp. 59–63. [ Google Scholar ]
  • Alzyout, M.; Bashabsheh, E.A.; Najadat, H.; Alaiad, A. Sentiment Analysis of Arabic Tweets about Violence Against Women using Machine Learning. In Proceedings of the 2021 IEEE 12th International Conference on Information and Communication Systems (ICICS), Valencia, Spain, 24–26 May 2021; pp. 171–176. [ Google Scholar ]
  • Jemai, F.; Hayouni, M.; Baccar, S. Sentiment Analysis Using Machine Learning Algorithms. In Proceedings of the 2021 IEEE International Wireless Communications and Mobile Computing (IWCMC), Harbin, China, 28 June–2 July 2021; pp. 775–779. [ Google Scholar ]
  • Ramadhani, A.M.; Goo, H.S. Twitter sentiment analysis using deep learning methods. In Proceedings of the 2017 IEEE 7th International Annual Engineering Seminar (InAES), Yogyakarta, Indonesia, 1–2 August 2017; pp. 1–4. [ Google Scholar ]
  • Demirci, G.M.; Keskin, Ş.R.; Doğan, G. Sentiment analysis in Turkish with deep learning. In Proceedings of the 2019 IEEE International Conference on Big Data, Honolulu, HI, USA, 29–31 May 2019; pp. 2215–2221. [ Google Scholar ]
  • Raza, G.M.; Butt, Z.S.; Latif, S.; Wahid, A. Sentiment Analysis on COVID Tweets: An Experimental Analysis on the Impact of Count Vectorizer and TF-IDF on Sentiment Predictions using Deep Learning Models. In Proceedings of the 2021 IEEE International Conference on Digital Futures and Transformative Technologies (ICoDT2), Islamabad, Pakistan, 20–21 May 2021; pp. 1–6. [ Google Scholar ]
  • Dholpuria, T.; Rana, Y.; Agrawal, C. A sentiment analysis approach through deep learning for a movie review. In Proceedings of the 2018 IEEE 8th International Conference on Communication Systems and Network Technologies (CSNT), Bhopal, India, 24–26 November 2018; pp. 173–181. [ Google Scholar ]
  • Harjule, P.; Gurjar, A.; Seth, H.; Thakur, P. Text classification on Twitter data. In Proceedings of the 2020 IEEE 3rd International Conference on Emerging Technologies in Computer Engineering: Machine Learning and Internet of Things (ICETCE), Jaipur, India, 7–8 February 2020; pp. 160–164. [ Google Scholar ]
  • Uddin, A.H.; Bapery, D.; Arif, A.S.M. Depression Analysis from Social Media Data in Bangla Language using Long Short Term Memory (LSTM) Recurrent Neural Network Technique. In Proceedings of the 2019 IEEE International Conference on Computer, Communication, Chemical, Materials and Electronic Engineering (IC4ME2), Rajshahi, Bangladesh, 11–12 July 2019; pp. 1–4. [ Google Scholar ]
  • Alahmary, R.M.; Al-Dossari, H.Z.; Emam, A.Z. Sentiment analysis of Saudi dialect using deep learning techniques. In Proceedings of the 2019 IEEE International Conference on Electronics, Information, and Communication (ICEIC), Auckland, New Zealand, 22–25 January 2019; pp. 1–6. [ Google Scholar ]
  • Yang, Y. Convolutional neural networks with recurrent neural filters. arXiv 2018 , arXiv:1808.09315. [ Google Scholar ]
  • Goularas, D.; Kamis, S. Evaluation of deep learning techniques in sentiment analysis from Twitter data. In Proceedings of the 2019 IEEE International Conference on Deep Learning and Machine Learning in Emerging Applications (Deep-ML), Istanbul, Turkey, 26–28 August 2019; pp. 12–17. [ Google Scholar ]
  • Hossain, N.; Bhuiyan, M.R.; Tumpa, Z.N.; Hossain, S.A. Sentiment analysis of restaurant reviews using combined CNN-LSTM. In Proceedings of the 2020 IEEE 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT), Kharagpur, India, 1–3 July 2020; pp. 1–5. [ Google Scholar ]
  • Tyagi, V.; Kumar, A.; Das, S. Sentiment Analysis on Twitter Data Using Deep Learning approach. In Proceedings of the 2020 IEEE 2nd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN), Greater Noida, India, 18–19 December 2020; pp. 187–190. [ Google Scholar ]
  • Rhanoui, M.; Mikram, M.; Yousfi, S.; Barzali, S. A CNN-BiLSTM model for document-level sentiment analysis. Mach. Learn. Knowl. Extr. 2019 , 1 , 832–847. [ Google Scholar ] [ CrossRef ] [ Green Version ]
  • Jang, B.; Kim, M.; Harerimana, G.; Kang, S.U.; Kim, J.W. Bi-LSTM model to increase accuracy in text classification: Combining Word2vec CNN and attention mechanism. Appl. Sci. 2020 , 10 , 5841. [ Google Scholar ] [ CrossRef ]
  • Chundi, R.; Hulipalled, V.R.; Simha, J. SAEKCS: Sentiment analysis for English–Kannada code switchtext using deep learning techniques. In Proceedings of the 2020 IEEE International Conference on Smart Technologies in Computing, Electrical and Electronics (ICSTCEE), Bengaluru, India, 10–11 July 2020; pp. 327–331. [ Google Scholar ]
  • Thinh, N.K.; Nga, C.H.; Lee, Y.S.; Wu, M.L.; Chang, P.C.; Wang, J.C. Sentiment Analysis Using Residual Learning with Simplified CNN Extractor. In Proceedings of the 2019 IEEE International Symposium on Multimedia (ISM), San Diego, CA, USA, 9–11 December 2019; pp. 335–3353. [ Google Scholar ]
  • Janardhana, D.; Vijay, C.; Swamy, G.J.; Ganaraj, K. Feature Enhancement Based Text Sentiment Classification using Deep Learning Model. In Proceedings of the 2020 IEEE 5th International Conference on Computing, Communication and Security (ICCCS), Bihar, India, 14–16 October 2020; pp. 1–6. [ Google Scholar ]
  • Chowdhury, S.; Rahman, M.L.; Ali, S.N.; Alam, M.J. A RNN Based Parallel Deep Learning Framework for Detecting Sentiment Polarity from Twitter Derived Textual Data. In Proceedings of the 2020 IEEE 11th International Conference on Electrical and Computer Engineering (ICECE), Dhaka, Bangladesh, 17–19 December 2020; pp. 9–12. [ Google Scholar ]
  • Vimali, J.; Murugan, S. A Text Based Sentiment Analysis Model using Bi-directional LSTM Networks. In Proceedings of the 2021 IEEE 6th International Conference on Communication and Electronics Systems (ICCES), Coimbatore, India, 8–10 July 2021; pp. 1652–1658. [ Google Scholar ]
  • Anbukkarasi, S.; Varadhaganapathy, S. Analyzing Sentiment in Tamil Tweets using Deep Neural Network. In Proceedings of the 2020 IEEE Fourth International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, 11–13 March 2020; pp. 449–453. [ Google Scholar ]
  • Kumar, D.A.; Chinnalagu, A. Sentiment and Emotion in Social Media COVID-19 Conversations: SAB-LSTM Approach. In Proceedings of the 2020 IEEE 9th International Conference System Modeling and Advancement in Research Trends (SMART), Moradabad, India, 4–5 December 2020; pp. 463–467. [ Google Scholar ]
  • Hossen, M.S.; Jony, A.H.; Tabassum, T.; Islam, M.T.; Rahman, M.M.; Khatun, T. Hotel review analysis for the prediction of business using deep learning approach. In Proceedings of the 2021 IEEE International Conference on Artificial Intelligence and Smart Systems (ICAIS), Coimbatore, India, 25–27 March 2021; pp. 1489–1494. [ Google Scholar ]
  • Younas, A.; Nasim, R.; Ali, S.; Wang, G.; Qi, F. Sentiment Analysis of Code-Mixed Roman Urdu-English Social Media Text using Deep Learning Approaches. In Proceedings of the 2020 IEEE 23rd International Conference on Computational Science and Engineering (CSE), Dubai, United Arab Emirates, 12–13 December 2020; pp. 66–71. [ Google Scholar ]
  • Dhola, K.; Saradva, M. A Comparative Evaluation of Traditional Machine Learning and Deep Learning Classification Techniques for Sentiment Analysis. In Proceedings of the 2021 IEEE 11th International Conference on Cloud Computing, Data Science & Engineering (Confluence), Uttar Pradesh, India, 28–29 January 2021; pp. 932–936. [ Google Scholar ]
  • Tan, K.L.; Lee, C.P.; Anbananthen, K.S.M.; Lim, K.M. RoBERTa-LSTM: A Hybrid Model for Sentiment Analysis with Transformer and Recurrent Neural Network. IEEE Access 2022 , 10 , 21517–21525. [ Google Scholar ] [ CrossRef ]
  • Kokab, S.T.; Asghar, S.; Naz, S. Transformer-based deep learning models for the sentiment analysis of social media data. Array 2022 , 14 , 100157. [ Google Scholar ] [ CrossRef ]
  • AlBadani, B.; Shi, R.; Dong, J.; Al-Sabri, R.; Moctard, O.B. Transformer-based graph convolutional network for sentiment analysis. Appl. Sci. 2022 , 12 , 1316. [ Google Scholar ] [ CrossRef ]
  • Tiwari, D.; Nagpal, B. KEAHT: A knowledge-enriched attention-based hybrid transformer model for social sentiment analysis. New Gener. Comput. 2022 , 40 , 1165–1202. [ Google Scholar ] [ CrossRef ] [ PubMed ]
  • Tesfagergish, S.G.; Kapočiūtė-Dzikienė, J.; Damaševičius, R. Zero-shot emotion detection for semi-supervised sentiment analysis using sentence transformers and ensemble learning. Appl. Sci. 2022 , 12 , 8662. [ Google Scholar ] [ CrossRef ]
  • Maghsoudi, A.; Nowakowski, S.; Agrawal, R.; Sharafkhaneh, A.; Kunik, M.E.; Naik, A.D.; Xu, H.; Razjouyan, J. Sentiment Analysis of Insomnia-Related Tweets via a Combination of Transformers Using Dempster-Shafer Theory: Pre–and Peri–COVID-19 Pandemic Retrospective Study. J. Med Internet Res. 2022 , 24 , e41517. [ Google Scholar ] [ CrossRef ]
  • Jing, H.; Yang, C. Chinese text sentiment analysis based on transformer model. In Proceedings of the 2022 IEEE 3rd International Conference on Electronic Communication and Artificial Intelligence (IWECAI), Sanya, China, 14–16 January 2022; pp. 185–189. [ Google Scholar ]
  • Alrehili, A.; Albalawi, K. Sentiment analysis of customer reviews using ensemble method. In Proceedings of the 2019 IEEE International Conference on Computer and Information Sciences (ICCIS), Aljouf, Saudi Arabia, 3–4 April 2019; pp. 1–6. [ Google Scholar ]
  • Bian, W.; Wang, C.; Ye, Z.; Yan, L. Emotional Text Analysis Based on Ensemble Learning of Three Different Classification Algorithms. In Proceedings of the 2019 IEEE 10th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications (IDAACS), Metz, France, 18–21 September 2019; Volume 2, pp. 938–941. [ Google Scholar ]
  • Gifari, M.K.; Lhaksmana, K.M.; Dwifebri, P.M. Sentiment Analysis on Movie Review using Ensemble Stacking Model. In Proceedings of the 2021 IEEE International Conference Advancement in Data Science, E-learning and Information Systems (ICADEIS), Bali, Indonesia, 13–14 October 2021; pp. 1–5. [ Google Scholar ]
  • Parveen, R.; Shrivastava, N.; Tripathi, P. Sentiment Classification of Movie Reviews by Supervised Machine Learning Approaches Using Ensemble Learning & Voted Algorithm. In Proceedings of the IEEE 2nd International Conference on Data, Engineering and Applications (IDEA), Bhopal, India, 28–29 February 2020; pp. 1–6. [ Google Scholar ]
  • Aziz, R.H.H.; Dimililer, N. Twitter Sentiment Analysis using an Ensemble Weighted Majority Vote Classifier. In Proceedings of the 2020 IEEE International Conference on Advanced Science and Engineering (ICOASE), Duhok, Iraq, 23–24 December 2020; pp. 103–109. [ Google Scholar ]
  • Varshney, C.J.; Sharma, A.; Yadav, D.P. Sentiment analysis using ensemble classification technique. In Proceedings of the 2020 IEEE Students Conference on Engineering & Systems (SCES), Prayagraj, India, 10–12 July 2020; pp. 1–6. [ Google Scholar ]
  • Athar, A.; Ali, S.; Sheeraz, M.M.; Bhattachariee, S.; Kim, H.C. Sentimental Analysis of Movie Reviews using Soft Voting Ensemble-based Machine Learning. In Proceedings of the 2021 IEEE Eighth International Conference on Social Network Analysis, Management and Security (SNAMS), Gandia, Spain, 6–9 December 2021; pp. 1–5. [ Google Scholar ]
  • Nguyen, H.Q.; Nguyen, Q.U. An ensemble of shallow and deep learning algorithms for Vietnamese Sentiment Analysis. In Proceedings of the 2018 IEEE 5th NAFOSTED Conference on Information and Computer Science (NICS), Ho Chi Minh City, Vietnam, 23–24 November 2018; pp. 165–170. [ Google Scholar ]
  • Kamruzzaman, M.; Hossain, M.; Imran, M.R.I.; Bakchy, S.C. A Comparative Analysis of Sentiment Classification Based on Deep and Traditional Ensemble Machine Learning Models. In Proceedings of the 2021 IEEE International Conference on Science & Contemporary Technologies (ICSCT), Dhaka, Bangladesh, 5–7 August 2021; pp. 1–5. [ Google Scholar ]
  • Al Wazrah, A.; Alhumoud, S. Sentiment Analysis Using Stacked Gated Recurrent Unit for Arabic Tweets. IEEE Access 2021 , 9 , 137176–137187. [ Google Scholar ] [ CrossRef ]
  • Tan, K.L.; Lee, C.P.; Lim, K.M.; Anbananthen, K.S.M. Sentiment Analysis with Ensemble Hybrid Deep Learning Model. IEEE Access 2022 , 10 , 103694–103704. [ Google Scholar ] [ CrossRef ]
  • Maas, A.; Daly, R.E.; Pham, P.T.; Huang, D.; Ng, A.Y.; Potts, C. Learning word vectors for sentiment analysis. In Proceedings of the IEEE 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Portland, OR, USA, 19–24 June 2011; pp. 142–150. [ Google Scholar ]
  • Go, A.; Bhayani, R.; Huang, L. Twitter sentiment classification using distant supervision. CS224N Proj. Rep. Stanf. 2009 , 1 , 2009. [ Google Scholar ]
  • Rosenthal, S.; Farra, N.; Nakov, P. SemEval-2017 task 4: Sentiment analysis in Twitter. arXiv 2019 , arXiv:1912.00741. [ Google Scholar ]

Click here to enlarge figure

LiteratureFeaturesClassifierDatasetAccuracy (%)
Jung et al. (2016) [ ] MNBSentiment14085
Athindran et al. (2018) [ ] NBSelf-collected dataset (from Tweets)77
Vanaja et al. (2018) [ ]A priori algorithmNB, SVMSelf-collected dataset (from Amazon)83.42
Iqbal et al. (2018) [ ]Unigram, BigramNB, SVM, MEIMDb88
Sentiment14090
Rathi et al. (2018) [ ]TF-IDFDTSentiment140, Polarity Dataset, and University of Michigan dataset84
AdaBoost 67
SVM 82
Hemakala and Santhoshkumar (2018) [ ] AdaBoostIndian Airlines84.5
Tariyal et al. (2018) [ ] Regression TreeOwn dataset88.99
Rahat et al. (2019) [ ] SVCAirline review82.48
MNB 76.56
Makhmudah et al. (2019) [ ]TF-IDFSVMTweets related to homosexuals99.5
Wongkar and Angdresey (2019)  [ ] NBTwitter (2019 presidential candidates of the Republic of Indonesia)75.58
Madhuri (2019) [ ] SVMTwitter (Indian Railways)91.5
Gupta et al. (2019) [ ]TF-IDFNeural NetworkSentiment14080
Prabhakar et al. (2019) [ ] AdaBoost (Bagging and Boosting)Skytrax and Twitter (Airlines)68 F-score
Hourrane et al. (2019) [ ]TF-IDFRidge ClassifierIMDb90.54
Sentiment 14076.84
Alsalman (2020) [ ]TF-IDFMNBArabic Tweets87.5
Saad et al. (2020) [ ]Bag of WordsSVMTwitter US Airline Sentiment83.31
Alzyout et al. (2021) [ ]TF-IDFSVMSelf-collected dataset78.25
Jemai et al. (2021) [ ] NBNLTK corpus99.73
LiteratureEmbeddingClassifierDatasetAccuracy (%)
Ramadhani et al. (2017) [ ] MLPKorean and English Tweets75.03
Demirci et al. (2019) [ ]word2vecMLPTurkish Tweets81.86
Raza et al. (2021) [ ]Count Vectorizer and TF-IDF VectorizerMLPCOVID-19 reviews93.73
Dholpuria et al. (2018) [ ] CNNIMDb (3000 reviews)99.33
Harjule et al. (2020) [ ] LSTMTwitter US Airline Sentiment82
Sentiment14066
Uddin et al. (2019) [ ] LSTMBangla Tweets86.3
Alahmary and Al-Dossari (2018) [ ]word2vecBiLSTMSaudi dialect Tweets94
Yang (2018) [ ]GloVeRecurrent neural filter-based CNN and LSTMStanford Sentiment Treebank53.4
Goularas and Kamis (2019) [ ]word2vec and GloVeCNN and LSTMTweets from semantic evaluation59
Hossain and Bhuiyan (2019)  [ ]word2vecCNN and LSTMFoodpanda and Shohoz Food75.01
Tyagi et al. (2020) [ ]GloVeCNN and BiLSTMSentiment14081.20
Rhanoui et al. (2019) [ ]doc2vecCNN and BiLSTMFrench articles and international news90.66
Jang et al. (2020) [ ]word2vechybrid CNN and BiLSTMIMDb90.26
Chundi et al. (2020) [ ] Convolutional BiLSTMEnglish, Kannada, and a mixture of both languages77.6
Thinh et al. (2019) [ ] 1D-CNN with GRUIMDb90.02
Janardhana et al. (2020) [ ]GloVeConvolutional RNNMovie reviews84
Chowdhury et al. (2020) [ ]word2vec, GloVe, and sentiment-specific word embeddingBiLSTMTwitter US Airline Sentiment81.20
Vimali and Murugan (2021) [ ] BiLSTMSelf-collected90.26
Anbukkarasi and Varadhaganapathy (2020) [ ] DBLSTMSelf-collected (Tamil Tweets)86.2
Kumar and Chinnalagu (2020) [ ] SAB-LSTMSelf-collected29 (POS) 50 (NEG) 21 (NEU)
Hossen et al. (2021) [ ] LSTMSelf-collected86
GRU 84
Younas et al. (2020) [ ] mBERTPakistan elections in 2018 (Tweets)69
XLM-R 71
Dhola and Saradva (2021) [ ] BERTSentiment14085.4
Tan et a. (2022) [ ] RoBERTa-LSTMIMDb92.96
Twitter US Airline Sentiment91.37
Sentiment14089.70
Kokab et al. (2022) [ ]BERTCBRNNUS airline reviews97
Self-driving car reviews90
US presidential election reviews96
IMDb93
AlBadani et al. (2022) [ ]ST-GCNST-GCNSST-B95.43
IMDB94.94
Yelp 201472.7
Tiwari and Nagpal (2022) [ ]BERTKEAHTCOVID-19 vaccine91
Indian Farmer Protests81.49
Tesfagergish et al. (2022) [ ]Zero-shot transformerEnsemble learningSemEval 201787.3
Maghsoudi et al. (2022) [ ]TransformerDSTSelf-collected84
Jing and Yang (2022) [ ]Light-TransformerLight-TransformerNLPCC2014 Task276.40
LiteratureFeature ExtractorClassifierDatasetAccuracy (%)
Alrehili et al. (2019) [ ] NB + SVM + RF + Bagging + BoostingSelf-collected89.4
Bian et al. (2019) [ ]TF-IDFLR + SVM + KNNCOVID-19 reviews98.99
Gifari and Lhaksmana (2021) [ ]TF-IDFMNB + KNN + LRIMDb89.40
Parveen et al. (2020) [ ] MNB + BNB + LR + LSVM + NSVMMovie reviews91
Aziz and Dimililer (2020) [ ]TF-IDFNB + LR + SGD + RF + DT + SVMSemEval-2017 4A72.95
SemEval-2017 4B90.8
SemEval-2017 4C68.89
Varshney et al. (2020) [ ]TF-IDFLR + NB + SGDSentiment14080
Athar et al. (2021) [ ]TF-IDFLR + NB + XGBoost + RF + MLPIMDb89.9
Nguyen and Nguyen (2018) [ ]TF-IDF, word2vecLR + SVM + CNN + LSTM (Mean)Vietnamese Sentiment69.71
LR + SVM + CNN + LSTM (Vote)Vietnamese Sentiment Food Reviews89.19
LR + SVM + CNN + LSTM (Vote)Vietnamese Sentiment92.80
Kamruzzaman et al.(2021) [ ]GloVe7-Layer CNN + GRU + GloVeGrammar and Online Product Reviews94.19
Attention embedding7-Layer CNN + LSTM + Attention LayerRestaurant Reviews96.37
Al Wazrah and Alhumoud (2021) [ ]AraVecSGRU + SBi-GRU + AraBERTArabic Sentiment Analysis90.21
Tan et a. (2022) [ ] RoBERTa-LSTM + RoBERTa-BiLSTM + RoBERTa-GRUIMDb94.9
Twitter US Airline Sentiment91.77
Sentiment14089.81
DatasetClassesStrongly PositivePositiveNeutralNegativeStrongly NegativeTotal
IMDb2-25,000-25,000-50,000
Twitter US Airline Sentiment3-236330999178-14,160
Sentiment1402-800,000-800,000-1,600,000
SemEval-2017 4A3-22,27728,52811,812-62,617
SemEval-2017 4B2-17,414-7735-25,149
SemEval-2017 4C5115115,25419,187694347643,011
SemEval-2017 4D2-17,414-7735-25,149
SemEval-2017 4E5115115,25419,187694347643,011
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

Tan, K.L.; Lee, C.P.; Lim, K.M. A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research. Appl. Sci. 2023 , 13 , 4550. https://doi.org/10.3390/app13074550

Tan KL, Lee CP, Lim KM. A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research. Applied Sciences . 2023; 13(7):4550. https://doi.org/10.3390/app13074550

Tan, Kian Long, Chin Poo Lee, and Kian Ming Lim. 2023. "A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research" Applied Sciences 13, no. 7: 4550. https://doi.org/10.3390/app13074550

Article Metrics

Article access statistics, further information, mdpi initiatives, follow mdpi.

MDPI

Subscribe to receive issue release notifications and newsletters from MDPI journals

  • Open access
  • Published: 17 April 2023

Twitter sentiment analysis using hybrid gated attention recurrent network

  • Nikhat Parveen 1 , 2 ,
  • Prasun Chakrabarti 3 ,
  • Bui Thanh Hung 4 &
  • Amjan Shaik 2 , 5  

Journal of Big Data volume  10 , Article number:  50 ( 2023 ) Cite this article

4908 Accesses

16 Citations

Metrics details

This article has been updated

Sentiment analysis is the most trending and ongoing research in the field of data mining. Nowadays, several social media platforms are developed, among that twitter is a significant tool for sharing and acquiring peoples’ opinions, emotions, views, and attitudes towards particular entities. This made sentiment analysis a fascinating process in the natural language processing (NLP) domain. Different techniques are developed for sentiment analysis, whereas there still exists a space for further enhancement in accuracy and system efficacy. An efficient and effective optimization based feature selection and deep learning based sentiment analysis is developed in the proposed architecture to fulfil it. In this work, the sentiment 140 dataset is used for analysing the performance of proposed gated attention recurrent network (GARN) architecture. Initially, the available dataset is pre-processed to clean and filter out the dataset. Then, a term weight-based feature extraction termed Log Term Frequency-based Modified Inverse Class Frequency (LTF-MICF) model is used to extract the sentiment-based features from the pre-processed data. In the third phase, a hybrid mutation-based white shark optimizer (HMWSO) is introduced for feature selection. Using the selected features, the sentiment classes, such as positive, negative, and neutral, are classified using the GARN architecture, which combines recurrent neural networks (RNN) and attention mechanisms. Finally, the performance analysis between the proposed and existing classifiers is performed. The evaluated performance metrics and the gained value for such metrics using the proposed GARN are accuracy 97.86%, precision 96.65%, recall 96.76% and f-measure 96.70%, respectively.

Introduction

Sentiment Analysis (SA) uses text analysis, NLP (Natural Language Processing), and statistics to evaluate the user’s sentiments. SA is also called emotion AI or opinion mining [ 1 ]. The term ‘sentiment’ refers to feelings, thoughts, or attitudesexpressed about a person, situation, or thing. SA is one of the NLP techniques used to identify whether the obtained data or information is positive, neutral or negative. Business experts frequently use it to monitor or detect sentiments to gauge brand reputation, social data and understand customer needs [ 2 , 3 ]. Over recent years, the amount of information uploaded or generated online has rapidly increased due to the enormous number of Internet users [ 4 , 5 ].

Globally, with the emergence of technology, social media sites [ 6 , 7 ] such as Twitter, Instagram, Facebook, LinkedIn, YouTube etc.,have been used by people to express their views or opinions about products, events or targets. Nowadays, Twitter is the global micro-blogging platform greatly preferred by users to share their opinions in the form of short messages called tweets [ 8 ]. Twitterholds 152 M (million) daily active users and 330 M monthly active users,with 500 M tweets sent daily [ 9 ]. Tweets often effectively createa vast quantity of sentiment data based on analysis. Twitter is an effective OSN (online social network) for disseminating information and user interactions. Twitter sentiments significantly influence diverse aspects of our lives [ 10 ]. SA and text classification aims at textual information extraction and further categorizes the polarity as positive (P), negative (N) or neutral (Ne).

NLP techniques are often used to retrieve information from text or tweet content. NLP-based sentiment classification is the procedure in which the machine (computer) extracts the meaning of each sentence generated by a human. Manual analysis of TSA (Twitter Sentiment Analysis) is time-consuming and requires more experts for tweet labelling. Hence, to overcome these challenges automated model is developed. The innovations of ML (Machine learning) algorithms [ 11 , 12 ],such as SVM (Support Vector Machine), MNB (Multinomial Naïve Bayes), LR (Logistic Regression), NB (Naïve Bayes) etc., have been used in the analysis of online sentiments. However, these methods illustrated good performance, but these approaches are very slow and need more time to perform the training process.

DL model is introduced to classify Twitter sentiments effectively. DL is the subset of ML that utilizes multiple algorithms to solve complicated problems. DL uses a chain of progressive events and permits the machine to deal with vast data and little human interaction. DL-based sentiment analysis offers accurate results and can be applied to various applications such as movie recommendations, product predictions, emotion recognition [ 13 , 14 , 15 ],etc. Such innovations have motivated several researchers to introduce DL in Twitter sentiment analysis.

SA (Sentiment Analysis) is deliberated with recognizing and classifying the polarity or opinions of the text data. Nowadays, people widely share their opinions and sentiments on social sites. Thus, a massive amount of data is generated online, and effectively mining the online data is essential for retrieving quality information. Analyzing online sentiments can createa combined opinion on certain products. Moreover, TSA (Twitter Sentiment Analysis) is challenging for multiple reasons. Short texts (tweets), owing to the maximum character limit, is a major issue. The presence of misspellings, slang and emoticons in the tweets requires an additional pre-processing step for filtering the raw data. Also, selecting a new feature extraction model would be challenging,further impacting sentiment classification. Therefore, this work aims to develop a new feature extraction and selection approach integrated with a hybrid DL classification model for accurate tweet sentiment classification. The existing research works [ 16 , 17 , 18 , 19 , 20 , 21 ] focus on DL-based TSA, which haven’t attained significant results because of smaller dataset usage and slower manual text labelling. However, the datasets with unwanted details and spaces also reduce the classification algorithm’s efficiency. Further, the dimension occupied by extracted features also degrades the efficiency of a DL approach. Hence, to overcome such issues, this work aims to develop a successful DL algorithm for performing Twitter SA. Pre-processing is a major contributor to this architecture as it can enhance DL efficiency by removing unwanted details from the dataset. This pre-processing also reduces the processing time of a feature extraction algorithm. Followed to that, an optimization-based feature selection process was introduced, which reduces the effort of analyzing irrelevant features. However, unlike existing algorithms, the proposed GARN can efficiently analyse the text-based features. Further, combining the attention mechanism with DL has enhanced the overall efficiency of the proposed DL algorithm. As attention mechanism have the greater ability to learn the selected features by reducing the complexity of model. This merit causes the attention mechanism to integrate with RNN and achieved effective performance.

The major objectives of the proposed research are:

To introduce a new deep model Hybrid Mutation-based White Shark Optimizer with a Gated Attention Recurrent Network (HMWSO-GARN) for Twitter sentiment analysis.

The feature set can be extracted with the new Term weighting-based feature extraction (TW-FE) approach named Log Term Frequency-based Modified Inverse Class Frequency (LTF-MICF) is used and compared with traditional feature extraction models.

To identify the polarity of tweets with the bio-inspired feature selection and deep classification model.

To evaluate the performance using different metrics and compare it with traditional DL procedures on TSA.

Related works

Some of the works related to dl-based twitter sentiment analysis are:.

Alharbi et al. [ 16 ] presented the analysis of Twitter sentiments using a DNN (deep neural network) based approach called CNN (Convolutional Neural Network). The classification of tweets was processed based on dual aspects, such as using social activities and personality traits. The sentiment (P, N or Ne) analysis was demonstrated with the CNN model, where the input layer involves the feature lists and the pre-trained word embedding (Word2Vec). The dual datasets used for processing were SemEval-2016_1 and SemEval-2016_2. The accuracy obtained by CNN was 88.46%, whereas the existing methods achieved less accuracy than CNN. The accuracy of existing methods is LSTM (86.48%), SVM (86.75%), KNN (k-nearest neighbour) (82.83%), and J48 (85.44%), respectively.

Tam et al. [ 17 ] developed a Convolutional Bi-LSTM model based on sentiment classification on Twitter data. Here, the integration of CNN-Bi-LSTM was characterized byextracting local high-level features. The input layer gets the text input and slices it into tokens. Each token was transformed into NV (numeric values). Next, the pre-trained WE (word embedding), such as GloVe and W2V (word2vector), were used to create the word vector matrix. The important words were extracted using the CNN model,and the feature set was further minimized using the max-pooling layer. The Bi-LSTM (backwards, forward) layers were utilized to learn the textual context. The dense layer (DeL) was included after the Bi-LSTM layer to interconnect the input data with output using weights. The performance was experimented using datasets TLSA (Twitter Label SA) and SST-2 (Stanford Sentiment Treebank). The accuracy with the TLSA dataset was (94.13%) and (91.13%) with the SST-2 dataset.

Chugh et al. [ 18 ] developed an improved DL model for information retrieval and classification of sentiments. The hybridized optimization algorithm SMCA was the integration of SMO (Spider Monkey Optimization) and CSA (Crow Search Algorithm). The presented DRNN (DeepRNN) was trained using the algorithm named SMCA. Here, the sentiment categorization was processed with DeepRNN-SMCA and the information retrieval was done with FuzzyKNN. The datasets used were the mobile reviews amazon dataset and telecom tweets dataset. Forsentiment classification, the accuracy obtained on the first dataset was (0.967), andthe latter was gained (0.943). The performance with IR (information retrieval) on dataset 1 gained (0.831) accuracy and dataset 2 obtained (0.883) accuracy.

Alamoudi et al. [ 19 ] performed aspect-based SA and sentiment classification aboutWE (word embeddings) and DL. The sentiment categorization involves both ternary and binary classes. Initially, the YELP review dataset was prepared and pre-processed for classification. The feature extraction was modelled with TF-IDF, BoW and Glove WE. Initially, the NB and LR were used for first set feature (TF-IDF, BoW features) modelling; then, the Glove features were modelled using diverse models such as ALBERT, CNN, and BERT for the ternary classification. Next, aspect and sentence-based binary SA was executed. The WE vector for sentence and aspect was done with the Glove approach. The similarity among aspects and sentence vectors was measured using cosine similarity, and binary aspects were classified. The highest accuracy (98.308%) was obtained when executed with the ALBERT model on aYELP 2-class dataset, whereas the BERT model gained (89.626%) accuracy with a YELP 3-class dataset.

Tan et al. [ 20 ] introduced a hybrid robustly optimized BERT approach (RoBERTa) with LSTM for analyzing the sentiment data with transformer and RNN. The textual data was processed with word embedding, and tokenization of the subwordwas characterized with the RoBERTa model. The long-distance Tm (temporal) dependencies were encoded using the LSTM model. The DA (data augmentation) based on pre-trained word embedding was developed to synthesize multiple lexical samples and present the minority class-based oversampling. Processing of DA solves the problem of an imbalanced dataset with greater lexical training samples. The Adam optimization algorithm was used to perform hyperparameter tuning,leading to greater results with SA. The implementation datasets were Sentiment140,Twitter US Airline,and IMDb datasets. The overall accuracy gained with these datasets was 89.70%, 91.37% and 92.96%, respectively.

Hasib et al. [ 21 ] proposed a novel DL-based sentiment analysis of Twitter data for the US airline service. The Twitter tweet is collected from the Kaggle dataset: crowdflowerTwitter US airline sentiment. Two models are used for feature extraction:DNN and convolutional neural network (CNN). Before applying four layers, the tweets are converted to metadata and tf-idf. The four layers of DNN aretheinput, covering, and output layers. CNN for feature extraction is by the following phases; data pre-processing, embedded features, CNN and integration features. The overall precision is 85.66%, recall is 87.33%, and f1-score is 87.66%, respectively. Sentiment analysis was used to identify the attitude expressed using text samples. To identify such attitudes, a novel term weighting scheme was developed by Carvalho and Guedes in [ 24 ], which was an unsupervised weighting scheme (UWS). It can process the input without considering the weighting factor. The SWS (Supervised Weighting Schemes) was also introduced, which utilizes the class information related to the calculated term weights. It had shown a more promising outcome than existing weighting schemes.

Learning from online courses are considered as the mainstream of learning domain. However, it was identified that analysing the users comments are considered as the major key for enhancing the efficiency and quality of online courses. Therefore, identifying sentiments from the user’s comments were considered as the efficient process for enhancing the learning process of online course. By taking this as major goal, an ensemble learning architecture was introduced by Pu et al. in [ 34 ] which utilizes glove, and Word2Vec for obtaining vector representation. Then, the extraction of deep features was achieved using CNN (Convolutional neural network) and bidirectional long and short time network (Bi-LSTM). The integration of suggested models were achieved using ensemble multi-objective gray wolf optimization (MOGWO). It achieves 91% f1-score value.

The sentiment dictionaries use binary sentiment analysis like BERT, word2vec and TF-IDF were used to convert movie and product review into vectors. Three-way decision in binary sentiment analysis separates the data sample into uncertain region (UNC), positive (POS) region and Negative (NEG) region. UNC got benefit from this three-way decision model and enhances the effect of binary sentiment analysis process. For the optimal feature selection, Chen, J et al. [ 35 ] developed a three-way decision model which get the optimal features representation of positive and negative domains for sentiment analysis. Simulation was done in both Amazon and IMDB database to show the effectiveness of the proposed methodology.

The advancements in biga data analytics (BDA) model is obtained by the people who generate large amount of data in their day-to-day live. The linguistic based tweets, feature extraction and sentimental texts placed between the tweets are analysed by the sentimental analysis (SA) process. In this article, Jain, D.K et al. [ 36 ] developed a model which contains pre-processing, feature extraction, feature selection and classification process. Hadoop Map Reduce tool is used to manage the big data, then pre-processing method is initiated to remove the unwanted words from the text. For feature extraction, TF-IDF vector is utilized and Binary Brain Storm Optimization (BBSO) is used to select the relevant features from the group of vectors. Finally, the incidence of both positive and negative sentiments is classified using Fuzzy Cognitive Maps (FCMs). Table 1 shows the comparative analysis of Twitter sentiment analysis using DL techniques.

Problem statement

There are many problems related to twitter sentiment analysis using DL techniques. The author in [ 16 ] has used the DL model and performed the sentiment classification from Twitter data. To classify such data, this method analysed each user’s behavioural information. However, this method has faced struggles in interpreting exact tweet words from the massive tweet corpus; due to this, the efficiency of a classification algorithm has been reduced.ConvBiLSTM was introduced in [ 17 ], which used glove and word2vec-based features for sentiment classification. However, the extracted features are not sufficient to achieve satisfactory accuracy. Then, processing time reduction was considered a major objective in [ 18 ], which utilizes DeepRNN for sentiment classification. But it fails to reduce the dimension occupied by the extracted features. This makes several valuable featuresfall within the local optimum. DL and word embedding processes were combined in [ 19 ], which utilizes Yelp reviews for processing. It has shown efficient performance for two classes but fails to provide better accuracy for three-class classification. Recently, a hybrid LSTM architecture was developed in [ 20 ], which has shown flexible processing over sentiment classification and takes a huge amount of time to process large datasets. DNN-based feature extraction and CNN-based sentiment classification were performed in [ 21 ], which haven’t shown more efficient performance than other algorithms. Further, it also concentrated only on 2 classes.

Few of the existing literatures fails to achieve efficient processing time, complexity and accuracy due to the availability of large dataset. Further, the extraction of low-level and unwanted features reduces the efficiency of classifier. Further, the usage of all extracted features occupies large dimension. These demerits makes the existing algorithms not suitable for efficient processing. This shortcomings open a research space for efficient combined algorithm for twitter data analysis. To overcome such issue, the proposed architecture has combined RNN and attention mechanism. The features required for classification is extracted using LTF-MICF which provides features for twitter processing. Then, the dimension occupied by huge extracted features are reduced using HMWSO algorithm. This algorithm has the ability to process the features in less time complexity and shows better optimal feature selection process. This selected features has enhanced the performance of proposed classifier over the large dataset and also achieved efficient accuracy with less misclassification error rate.

Proposed methodology

For sentiment classification of Twitter tweets, a DL technique of gated attention recurrent network (GARN) is proposed. The Twitter dataset (Sentiment140 dataset) with sentiment tweets that the public can access is initially collected and given as input. After collecting data, the next stage is pre-processing the tweets. In the pre-processing stage, tokenization, stopwords removal, stemming, slang and acronym correction, removal of numbers, punctuations &symbol removal, removal of uppercase and replacing with lowercase, character &URL, hashtag & user mention removal are done. Now the pre-processed dataset act as input for the next process. Based on term frequency, a term weight is allocated for each term in the dataset using the Log Term Frequency-based Modified Inverse Class Frequency (LTF-MICF) extraction technique. Next, Hybrid Mutation based White Shark Optimizer (HMWSO) is used to select optimal term weight. Finally, the output of HMWSO is fed into the gated attention recurrent network (GARN) for sentiment classification with three different classes. Figure  1 shows a diagrammatic representation of the proposed methodology.

figure 1

Architecture diagram

Tweets pre-processing

Pre-processing is converting the long data into short text to perform other processes such as classification, detecting unwanted news, sentiment analysis etc., as Twitter users use different styles to post their tweets. Some may post the tweet in abbreviations, symbols, URLs, hashtags, and punctuations. Also, tweets may consist of emojis, emoticons, or stickers to express the user’s sentiments and feelings. Sometimes the tweets may be in a hybrid form,such as adding abbreviations, symbols and URLs. So these kinds of symbols, abbreviations, and punctuations should be removed from the tweet toclassify the dataset further. The features to be removed from the tweet dataset are tokenization, stopwords removal, stemming, slag and acronym correction, removal of numbers, punctuation and symbol removal, noise removal, URL, hashtags, replacing long characters, upper case to lower case, and lemmatization.

Tokenization

Tokenization [ 28 ] is splitting a text cluster into small words, symbols, phrases and other meaningful forms known as tokens. These tokens are considered as input for further processing. Another important use of tokenization is that it can identify meaningful words.The tokenization challenge depends only on the type of language used. For example, in languages such as English and French, some words may be separated by white spaces. Other languages, such as Chinese and Thai words,are not separated. The tokenization process is carried out in the NLTK Python library. In this phase, the data is processed in three forms: convert the text document into word counts. Secondly,data cleansing and filtering occur, andfinally, the document is split into tokens or words.

The example provided below illustrates the original tweet before and after performing tokenization:

Before tokenization

DLis a technology which trains the machineto behave naturally like a human being.

After tokenization

Deep, learning, is, a, technology, which, train, the, machine, to, behave, naturally, like, a, human, being.

Numerous tools are available to tokenize a text document. Some of them are as follows;

NLTK word tokenize

Nlpdotnet tokenizer

TextBlob word tokenize

Mila tokenizer

Pattern word tokenize

MBSP word tokenize

Stopwords removal

Stopword removal [ 28 ] is a process of removing frequently used words with meaningless in a text document. Stopwords such as are, this, that, and, so are frequently occurring words in a sentence. These words are also termed pronouns, articles and prepositions. Such words are not used forfurther processing, so removing those words is required. If such words are not removed, the sentence seems heavy and becomes less important for the analyst.Also, they are not considered keywords in Twitter analysis applications. Many methods exist to remove stopwords from a document; they are.

Classic method

Mutual information (MI) method

Term based random sampling (TBRS) method

Removing stopwords from a pre-compiled list is performed using a classic-based method. Z-methods are known as Zipf’s law-based methods. In Z-methods, three removal processes occur: removing the most frequently used words, removing the words which occur once in a sentence, and removing words with a document frequency of low inverse. In the mutual MI method, the information with low mutual will be removed. In the TBRS method, the words are randomly chosen from the document and given rank for a particular term using the Kullback–Leibler divergence formula, which is represented as;

where \(Q_{l} (t)\) is the normalized term frequency (NTF) of the term \(t\) within a mass \(l\) , and NTF is denoted as \(Q(t)\) of term \(t\) in the entire document. Finally, using this equation, the least terms are considered a stopword list from which the duplications are removed.

Removing prefixesand suffixes from a word is performed using the stemming method. It can also be defined as detecting the root and stem of a word and removing them. For example, processed word processing can be stemmed from a single word as a process [ 28 ]. The two points to be considered while performing stemming are: the words with different meanings must be kept separate, and the words of morphological forms will contain the same meaning and must be mapped with a similar stem. There are stemming algorithms to classify the words. The algorithms are divided into three methods: truncating, statistical, and mixed methods. Truncating method is the process of removing a suffix from a plural word. Some rules must be carried out to remove suffixes from the plurals to convert the plural word into the singular form.

Different stemmer algorithms are used under the truncating method. Some algorithms are Lovins stemmer, porters stemmer, paice and husk stemmer, and Dawson stemmer. Lovins stemmer algorithm is used to remove the lengthy suffix from a word. The drawback of using this stemmer is that it consumes more time to process. Porter’s stemmer algorithm removes suffixes from a word by applying many rules. If the applied rule is satisfied, the suffix is automatically removed. The algorithm consists of 60 rules and is faster than theLovins algorithm. Paice and husk is an iterative algorithm that consists of 120 rules to remove the last character of the suffixed word. This algorithm performs two operations, namely, deletion and replacement. The Dawson algorithm keeps the suffixed words in reverse order by predicting their length and the last character. In statistical methods, some algorithms are used: N-gram stemmer, HMM stemmer, and YASS stemmer. In a mixed process, the inflectional and derivational methods are used.

Slang and acronym correction

Users typically use acronyms and slang to limit the characters in a tweet posted on social media [ 29 ]. The use of acronyms and slangis an important issue because the users do not have the same mindset to make the acronym in the same full form, and everyone considers the tweet in different styles or slang. Sometimes, the acronym posted may possess other meanings or be associated with other problems. So, interpreting these kinds of acronyms and replacing them with meaningful words should be done so the machine can easily understand the acronym’s meaning.

An example illustrates the original tweet with acronyms and slang before and after removal.

Before removal : ROM permanently stores information in the system, whereas RAM temporarily stores information in the system.

After removal : Read Only Memory permanently store information in the system, whereas Random Access Memory temporarily store information in the system.

Removal of numbers

Removal of numbers in the Twitter dataset is a process of deleting the occurrence of numbers between any words in a sentence [ 29 ].

An example illustrates the original tweet before and after removing numbers.

Before removal : My ink “My Way…No Regrets” Always Make Happiness Your #1 Priority.

After removal : My ink “My Way … No Regrets” Always Make Happiness Your # Priority.

Once removed, the tweet will no longer contain any numbers.

Punctuation and symbol removal

The punctuation and symbols are removed in this stage. Punctuations such as ‘.’, ‘,’, ‘?’, ‘!’, and ‘:’ are removed from the tweet [ 29 , 30 ].

An example illustrates the original tweet before and after removing punctuation marks.

After removal : My ink My Way No Regrets Always Make Happiness Your Priority.

After removal, the tweet will not contain any punctuation. Symbol removal is the process of removing all the symbols from the tweet.

An example illustrates the original tweet before and after removing symbols.

After removal : wednesday addams as a disney princess keeping it.

After removal, there would not be any symbols in the tweet.

Removal of uppercase into lowercase character

In this process of removal or deletion, all the uppercase charactersare replaced with lowercase characters [ 30 ].

An example illustrates the original tweet before and after removing uppercase characters into lowercase characters.

After removal : my ink my way no regrets always make happiness your priority.

After removal, the tweet will no longer contain capital letters.

URL, hashtag & user mention removal

For clear reference,Twitter users post tweets with various URLs and hashtags [ 29 , 30 ]. This information ishelpful for the people but mostly noise, which cannot be used for further processes. The example provided below illustrates the original tweet with URL, hashtag and user mention before removal and after removal:

Before removal : This gift is given by #ahearttouchingpersonfor securing @firstrank. Click on the below linkto know more https://tinyurl.com/giftvoucher .

After removal : This is a gift given by a heart touching person for securing first rank. Click on the below link to know more.

Term weighting-based feature extraction

After the pre-processing, the pre-processed data is extracted in text documents based on the term weighting \(T_{w}\) [ 22 ]. A new term weighting scheme,Log term frequency-based modified inverse class frequency (LTF-MICF), is employed in this research paper for feature extraction based on term weight. The technique integrates two different term weighting schemes: log term frequency (LTF) and modified inverse class frequency (MICF). The frequently occurring terms in the document are known as term frequency \(^{f} T\) . But, \(^{f} T\) alone is insufficient because the frequently occurring terms will possess heavyweight in the document. So, the proposed hybrid feature extraction technique can overcome this issue. Therefore, \(^{f} T\) is integrated with MICF, an effective \(T_{w}\) approach. Inverse class frequency \(^{f} C_{i}\) is the inverse ratio of the total class of terms that occurs on training tweets to the total classes. The algorithm for the TW-FE technique is shown in algorithm 1 [ 22 ].

figure b

Two steps are involved in calculating LTF \(^{l} T_{f}\) . The first step is to calculate the \(^{f} T\) of each term in the pre-processed dataset. The second step is, applying log normalization to the output of the computed \(^{f} T\) data. The modified version of \(^{f} C_{i}\) , the MICF is calculated for each term in the document. MICF is said to be executed then;each term in the document should have different class-particular ranks, which should possess differing contributions to the total term rank. It is necessary to assign dissimilar weights for dissimilar class-specific ranks. Consequently, the sum of the weights of all class-specific ranks is employed as the total term rank. The proposed formula for \(T_{w}\) using LTF-based MICF is represented as follows [ 22 ];

where a specific weighting factor is denoted \(w_{sp}\) for each \(tp\) for class \(C_{r}\) , which can be clearly represented as;

The method used to assign a weight for a given dataset is known as the weighting factor (WF). Where the number of tweets \(s_{i}\) in class \(C_{r}\) which contains pre-processed terms \(tp\) is denoted as \(s_{i} \mathop{t}\limits^{\rightharpoonup}\) . The number of \(s_{i}\) in other classes, which contains \(tp\) is denoted as \(s_{i} \mathop{t}\limits^{\leftarrow}\) . The number of \(s_{i}\) in-class \(C_{r}\) , which do not possess, \(tp\) is denoted as \(s_{i} \overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{t}\) . The number of \(s_{i}\) in other classes, which do not possess, \(tp\) is denoted as \(s_{i} \tilde{t}\) . To eliminate negative weights, the constant ‘1’ is used. In extreme cases, to avoid a zero-denominator issue, the minimal denominator is set to ‘1’ if \(s_{i} \mathop{t}\limits^{\leftarrow}\)  = 0 or \(s_{i} \overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{t}\)  = 0. The formula for \(^{l} T_{f} (tp)\) and \(^{f} C_{i} (tp)\) can be presented as follows [ 22 ];

where raw count of \(tp\) on \(s_{i}\) is denoted as \(^{f} T(tp,s_{i} )\) , i.e., the total times of \(tp\) occurs on \(s_{i}\) .

where \(r\) refers to the total number of classes in \(s_{i}\) , and \(C(tp)\) is the total number of classes in \(tp\) . The dataset features are represented as \(f_{j} = \left\{ {f_{1} ,f_{2} ,..........f_{3} ,......f_{m} } \right\}\) after \(T_{w}\) , where the number of weighted terms in the pre-processed dataset is denoted as \(f_{1} ,f_{2} ,...f_{3} ,...f_{m}\) respectively. The computed rank values of each term in the text document of tweets are used for performing the further process.

Feature selection

The existence of irrelevant features in the data can reduce the accuracy level of the classification process and make the model to learn those irrelevant features. This issue is termed as the optimization issue. This issue can be ignored only by taking optimal solutions from the processed dataset. Therefore, a feature selection algorithm named White shark optimizer with a hybrid mutation strategy is utilized to achieve a feature selection process.

White Shark Optimizer (WSO)

WSO is proposed based on the behaviour of the white shark while foraging [ 23 ]. Great white shark in the ocean catches prey by moving the waves and other features to catch prey kept deep in the ocean. Since the white shark catch prey based on three behaviours, namely: (1) the velocity of the shark in catching the prey, (2) searching for the best optimal food source, (3) the movement of other sharks toward the shark, which is near to the optimal food source. The initial white shark population is represented as;

where \(W_{q}^{p}\) is the initial parameters of the \(p_{th}\) white shark in the \(q_{th}\) dimension. The upper and lower bounds in the \(q_{th}\) dimension are denoted as \(up_{q}\) and \(lb_{q}\) , respectively. Whereas \(r\) denotes a random number in the range [0, 1].

The white shark’s velocity is to locate the prey based on the motion of the sea wave is represented as [ 23 ];

where \(s = 1,2,....m\) is the index of a white shark with a population size of \(m\) . The new velocity of \(p_{th}\) shark is denoted as \(vl_{s + 1}^{p}\) in \((s + 1)_{th}\) step. The initial speed of the \(p_{th}\) shark in the \(s_{th}\) step is denoted as \(vl_{s}^{p}\) . The global best position achieved by any \(p_{th}\) shark in \(s_{th}\) step is denoted as \(W_{{gbest_{s} }}\) . The initial position of the \(p_{th}\) shark in \(s_{th}\) step is denoted as \(W_{s}^{p}\) . The best position of the \(p_{th}\) shark and the index vector on attainingthe best position are denoted as \(W_{best}^{{vl_{s}^{p} }}\) and \(vc^{i}\) . Where \(C_{1}\) and \(C_{2}\) in the equation is defined as the creation of uniform random numbers of the interval [1, 0]. \(F_{1}\) and \(F_{2}\) are the force of the shark to control the effect of \(W_{{gbest_{s} }}\) and \(W_{best}^{{vl_{s}^{p} }}\) on \(W_{s}^{p}\) . \(\mu\) represents to analyze the convergence factor of the shark. The index vector of the white shark is represented as;

where \(rand(1,t)\) is a random numbers vector obtained with a uniform distribution in the interval [0, 1].The forces of the shark to control the effect are represented as follows;

The initial and maximum sum of the iteration is denoted as \(u\) and \(U\) , whereas the white shark’s current and sub-ordinate velocities are denoted as \(F_{\min }\) and \(F_{\max }\) . The convergence factor is represented as;

where \(\tau\) is defined as the acceleration coefficient. The strategy for updating the position of the white shark is represented as follows;

The new position of the \(p_{th}\) shark in \((s + 1)\) iteration, \(\neg\) represent the negation operator, \(c\) and \(d\) represents the binary vectors. The search space lower and upper bounds are denoted as \(lo\) and \(ub\) . \(W_{0}\) and \(fr\) denotes the logical vector and frequency at which the shark moves. The binary and logic vectors are expressed as follows;

The frequency at which the white shark moves is represented as;

\(fr_{\max }\) and \(fr_{\min }\) represents the maximum and minimum frequency rates. The increase in force at each iteration is represented as;

where \(MV\) represents the weight of the terms in the document.

The best optimal solution is represented as;

where the position updation following the food source of \(p_{th}\) the white shark is denoted as \(W_{s + 1}^{\prime p}\) . The \({\text{sgn}} (r_{2} - 0.5)\) produce 1 or −1 to modify the search direction. The food source and shark distance \(\vec{D}is_{w}\) and the strength of the white shark following other sharks close to the food source \(Str_{sns}\) is formulated as follows;

The initial best optimal solutions are kept constant, and the position of other sharks is updated according to these two constant optimal solutions. The fish school behaviour of the sharks is formulated as follows;

The weight factor \(^{j} we\) is represented as;

where \(^{q} fit\) is defined as the fitness of each term in the text document. The expansion of the equation is represented as;

The concatenation of hybrid mutation \(HM\) is applied to the WSO for a faster convergence process. Thus, the hybrid mutation applied with the optimizer is represented as;

whereas \(G_{a} (\mu ,\sigma )\) and \(C_{a} (\mu ,\sigma )\) represents an arbitrary number of both Gaussian and Cauchy distribution. \((\mu ,\sigma )\) and \((\mu^{\prime},\sigma^{\prime})\) represents the mean and variance function of both Gaussian and Cauchy distributions. \(D_{1}\) and \(D_{2}\) represents the coefficients of Gaussian \(^{t + 1} GM\) along with Cauchy \(^{t + 1} CM\) mutation. On applying these two hybrid mutation operators, a new solution is produced that is represented as;

whereas \(^{p}_{we}\) represents the weight vector and \(PS\) represents the size of the population. The selected features from the extracted features are represented as \(Sel(p = 1,2,...m)\) . The WSO output is denoted as \((sel) = \left\{ {sel^{1} ,sel^{2} ,.....sel^{m} } \right.\left. {} \right\}\) ,which is a new sub-group of terms in the dataset. At the same time, \(m\) denotes a new number of each identical feature. Finally, the feature selection stage provides a dataset document with optimal features.

Gated attention recurrent network (GARN) classifier

GARN is a hybrid network of Bi-GRU with an attention mechanism. Many problems occur due to the utilization of recurrent neural network (RNNs) because it employs old information rather than the current information for classification. To overcome this problem, a bidirectional recurrent neural network (BRNN) model is proposed, which can utilize both old and current information. So, to perform both the forward and reverse functions, two RNNs are employed. The output will be connected to a similar output layer to record the feature sequence. Based on the BRNN model, another bidirectional gated recurrent unit (Bi-GRU) model is introduced, which replaces the hidden layer of the BRNN with a single GRU memory unit. Here, the hybridization of both Bi-GRU with attention is considered agated attention recurrent network (GARN) [ 25 ] and its structure is given in Fig.  2 .

figure 2

Structure of GARN

Consider an m-dimensional input data as \((y_{1} ,y_{2} ,....,y_{m} )\) . The hidden layer in the BGRU produces an output \(H_{{t_{1} }}\) at a time interval \(t_{1}\) is represented as;

where the weight factor for two connecting layers is denoted as \(w_{e}\) , \(c\) is the bias vector, \(\sigma\) represents the activation function, positive and negative outputs of GRU is denoted as \(\vec{H}_{{t_{1} }}\) and \(\overleftarrow {H} _{{t_{1} }}\) , \(\oplus\) is a bitwise operator.

Attention mechanism

In sentiment analysis, the attention module is very important to denote the correlation between the terms in a sentence and the output [ 26 ]. For direct simplification, an attention model is used in this proposal named as feed-forward attention model. This simplification is to produce a single vector \(\nu\) from the total sequence represented as;

Where \(\beta\) is a learning function and is identified using \(H_{{t_{1} }}\) . From the above Eq.  34 , the attention mechanism produces a fixed length for the embedding layer in a BGRU model for every single vector \(\nu\) by measuring the average weight of the data sequence \(H\) . The structure for attention mechanism is shown in Fig.  3 . Therefore, the final sub-set for the classification is obtained from:

figure 3

Structure of attention mechanism

Sentiment classification

Twitter sentiment analysis is formally a classification problem. The proposed approach classifies the sentiment data into three classes: positive, negative and neutral. For classification, the softmax classifier is used to classify the output in the hidden layer \(H^{\# }\) is represented as;

where \(w_{e}\) is the weight factor, \(c\) is a bias vector and \(H^{\# }\) is the output of the last hidden layer. Also, the cross-entropy is evaluated as a loss function represented as;

The total number of samples is denoted as, \(n\) . The real category of the sentence is denoted as \(sen_{j}\) ,the sentence with the predictive category is denoted as \(x_{j}\) , and the \(L2\) regular item is denoted as \(\lambda ||\theta ||^{2}\) .

Results and discussion

This section briefly describes the performance metrics like accuracy, precision, recall and f-measure. The overall analysis of the Twitter sentiment classification with pre-processing, feature extraction, feature selection and classification are also analyzed and discussed clearly. Results on comparing the existing and trending classifiers with term weighting schemes in bar graphs and tables are included. Finally, a small discussion about the overall workflow concluded the research by importing the analyzed performance metrics. The sentiment is an expression from individuals based on an opinion on any subject. Tweet-based analysis of sentiment mainly focuses on detecting positive and negative sentiments. So, it is necessary to enhance the classification classes in which a neutral class is added to the datasets.

The dataset utilized in our proposed work is Sentiment 140, gathered from [ 27 ], which contains 1,600,000tweets extracted from Twitter API. The score values for each tweet as, for positive tweets, the rank value is 4.Similarly, for negative tweets rank value is 0, and for neutral tweets, the rank value is 2.The total number of positive tweets in a dataset is 20832, neutral tweets are 18318, negative tweets are 22542, and irrelevant tweets are 12990. From the entire dataset, 70%is used for training, 15% for testing and 15% for validation. Table 2 shows the system configuration of the designed classifier.

Performance metrics

In this proposed method, 4 different weight schemes are compared with other existing,proposed classifiers in which the performance metrics are precision, f1-score, recall and accuracy. Four notations, namely, true-positive \((t_{p} )\) , true-negative \((t_{n} )\) , false-positive \((f_{p} )\) and false-negative, \((f_{n} )\) are particularly utilized to measure the performance metrics.

Accuracy \((A_{c} )\)

Accuracy is the dataset’s information accurately being classified by the proposed classifier. The accuracy value for the proposed method is obtained using Eq.  39 .

Precision \((P_{r} )\)

Precision is defined as the number of terms accurately identified positive to the total identified positively. The precision value for the proposed method is obtained using Eq.  40 .

Recall \((R_{e} )\)

The recall is defined as the percentage of accurately identified positive observations to the total observations in the dataset. The recall value for the proposed method is obtained using Eq.  41 .

F1-score \((F_{s} )\)

F1-score is defined as the average weight of recall and precision. The f1-score value for the proposed method is obtained using Eq.  42 .

Analysis of Twitter sentiments using GARN

The research paper mainly focuses on classifying Twitter sentiments in the form of three classes, namely, positive, negative and neutral. The data are collected using Twitter api. After collecting data, it is given as input for pre-processing. The unwanted symbols are removed in the pre-processing technique, giving a new pre-processed dataset. Now, the pre-processed dataset is given as an input to extract the required features. These features are extracted from the pre-processed dataset using a novel technique known as the log term frequency-based modified inverse class frequency (LTF-MICF) model, which integrates two-weight schemes, LTF and MICF. Here, the required features are extracted in which the extracted features are given as input to select an optimal feature subset. The optimized feature subset is selected using a hybrid mutation-based white shark optimizer (HMWSO). The mutation is referred to as the Cauchy mutation and the Gaussian mutation. Finally, with the selected feature sub-set as input, the sentiments are classified under three classes using a classifier named gated recurrent attention recurrent network (GARN), which is a hybridization of Bi-GRU with an attention mechanism.

The evaluated value of the proposed GARN is preferred for classifying the sentiments of Twitter tweets. The suggested GARN model is implemented in the Python environment, and the sentiment140 Twitter dataset is utilized for training the proposed model. To evaluate the efficiency of the classifier, the proposed classifier is compared with existing classifiers, namely, CNN (Convolutional neural network), DBN (Deep brief neural network), RNN (Recurrent neural network), and Bi-LSTM (Bi-directional long short term memory). Along with these classifiers, the proposed term weighting scheme (LTF-MICF) with the existing term weighting schemes TF (Term Frequency), TF-IDF (Term-frequency-inverse document frequency), TF-DFS (Term-frequency-distinguishing feature selector), and W2V (Word to vector) are also analyzed. The performance was evaluated for both sentiment classification with an optimizer and without using an optimizer. The metrics evaluated are accuracy, precision, recall and f1-score, respectively.The existing methods implemented and proposed (GARU) are Bi-GRU, RNN, Bi-LSTM, and CNN. The simulation parameters used for processing the proposed and existing methods are discussed in Table 3 . This comparative analysis is performed to show the efficiency of a proposed over the other related existing algorithms.

Figure  4 compares the accuracy of the GARN with the existing classifiers. The accuracy obtained by existing Bi-GRU, Bi-LSTM, RNN, and CNN for the LTF-MICF is 96.93%, 95.79%, 94.59% and 91.79%. In contrast, the proposed GARN classifier achieves an accuracy of 97.86% and is considered the best classifier with the LTF-MICF term weight scheme for classifyingTwitter sentiments. But when the proposed classifier is compared with other term weighting schemes,TF-DFS, TF-IDF, TF and W2V, the accuracy obtained is 97.53%, 97.26%, 96.73% and 96.12%. Therefore, the term weight scheme withthe GARN classifier is the best solution for classification problems. Table 4 contains the accuracy values attained by four existing classifiers and the proposed classifier with four existing term weight schemes and proposed term weight scheme.

figure 4

Accuracy of the classifiers with term weight schemes

Figure  5 shows the precision performance analysis with the proposed and four existing classifiers for different term weight schemes. The precision of all existing classifiers with other term weight schemes is less than the proposed term weighting scheme. In Bi-GRU, the precision obtained by TF-DFS, TF-IDF, TF and W2V is 94.51%, 94.12%, 93.76% and 93.59%. But, when Bi-GRU is compared with the LTF-MICF term weight scheme, the precision level is increased by 95.22%. The precision achieved by the suggested method GARN with TF-DFS, TF-IDF, TF and W2V is 96.03%, 95.67%, 94.90% and 93.90%. Whereas, when the GARN classifier is compared with the suggested term weighting scheme LTF-MICF the precision achieved is 96.65%, which is considered the best classifier with the best term weighting scheme. Figure  5 shows that the GARN classifier with the LTF-MICF term weighting scheme achieved the highest precision level compared with other classifiers and term weighting schemes.Table 5 indicates the precision performance analysis for existing and proposed classifiers with term weight schemes.

figure 5

Precision of the classifiers with term weight schemes

The analysis graph of Fig.  6 shows the f-measure of the four prevalent classifiers and suggested classifiers with different term weight schemes. The f-measure of all the prevalent classifier with other term weight schemes are minimum compared to the suggested term weighting scheme. In Bi-LSTM, the f-measure gained with TF-DFS, TF-IDF, TF and W2V is93.34%, 92.77%, 92.28% and 91.89%. Compared with LTF-MICF, the f-measure level is improved by 95.22%. The f-measure derived by the advance GARN with TF-DFS, TF-IDF, TF and W2V is 96.10%, 95.65%, 94.90% and 94.00%. When GARN is compared with the advanced LTF-MICF scheme, the f-measure grows by 96.70%, which is considered the leading classifier with the supreme term weighting scheme. Therefore, from Fig.  6 , the GARN model with the LTF-MICF scheme achieved the greatest f-measure level compared with other DL models and term weighting schemes.Table 6 indicates the performance analysis of the f-measure for both prevalent and suggested classifiers with term weight schemes.

figure 6

F-measure of the classifiers with term weight schemes

Figure  7 illustrates the recall of the four previously discovered DL models andthe recommended model of dissimilar term weight schemes. The recall of the previously discovered classifier with other term weight schemes is reduced compared to the novel term weighting scheme. In RNN, the recall procured with TF-DFS, TF-IDF, TF and W2V is 91.83%, 90.65%, 90.36% and 89.04%. In comparison with LTF-MICF, the recall value is raised by 92.25%. The recall acquired by the invented GARN with TF-DFS, TF-IDF, TF and W2V is 96.23%, 95.77%, 94.09% and 94.34%. Comparing GARN with the advanced LTF-MICF scheme maximizes recall by 96.76%,which is appraised as the prime classifier with an eminent term weighting scheme. Therefore, from Fig.  7 , the GARN model with the LTF-MICF scheme securedextraordinaryrecallvalue when differentiated from other DL models and term weighting schemes. Table 7 indicates the recall performance analysis for the previously discovered and recommended classifiers with term weight schemes.

figure 7

Recall of the classifiers with term weight schemes

The four stages employed to implement this proposed work are Twitter data collection, tweet pre-processing, term weighting-based feature extraction, feature selection and classification of sentiments present in the tweet. Initially, the considered tweet sentiment dataset is subjected to pre-processing.Here, tokenization, stemming, punctuations, symbols, numbers, hashtags, and acronyms are removed. After removal, a clean pre-processed dataset is obtained. The performance achieved by proposed and existing methods for solving proposed objective is discussed in Table 8 .

Using this pre-processed dataset, a term weighting-based feature extraction is done using an integrated terms weight scheme such as LTF and MICF as a novel term weighting scheme technique named LTF-MICF technique. An optimization algorithm, HMWSO, with two hybrid mutation techniques, namely Cauchy and Gaussian mutation, is chosen for feature selection. Finally, the GARN classifier is used for the classification of Twitter sentiments. The sentiments are classified as positive, negative and neutral. The performance of existing classifiers with term weighting schemes and the proposed classifier with term weighting schemes are analyzed. The performance comparison between the proposed and existing methods is shown in Table 9 . The existing details are collected from previous works developed for sentiment analysis from theTwitter dataset.

Many DL techniques use only a single feature extraction technique, namely term frequency (TF) and distinguishing feature selector (DFS), which will not accurately extract the features. The proposed methods without optimization can diminish the proposed model’s accuracy level. The feature extraction technique used in our proposed work will perform greatly because it can extract features from frequently occurring terms in the document. The proposed work uses an optimization algorithm to increase the accuracy level of the designed model.The achieved results are shown in Fig.  8 .

figure 8

Performance comparison between proposed and existing methods

The accuracy comparison by varying the total selected features is described in Fig.  9 (a). The ROC curve of proposed model is discussed in Fig.  9 (b). The ROC is evaluated using FPR (False positive rate), and TPR (True positive rate). The AUC (Area under curve) obtained for proposed is found to be 0.989. It illustrates that the proposed model has shown efficient accuracy with less error rate.

figure 9

a Accuracy vs no of features b ROC curve

Ablation study

The ablation study for the proposed model is discussed in Table 10 . In this the performance of overall architecture is described, further the comparative analysis between existing techniques also described in Table 10 . Among all the techniques the proposed GARN has attained efficient performance than other algorithms. The hybridized methods are separately analysed and the results achieved by such techniques are also analysed which indicates that the integrating of all methods have improved the overall efficiency than applying the techniques in separate manner. Along with that, the ablation study for feature selection process is also evaluated and the obtained results are provided in Table 10 .The existing classification and feature selection methods taken for comparison are GRN (Gated recurrent network), ARN (Attention based recurrent network), RNN (Recurrent neural network), WSO, and MO (Mutation optimization).

The computational complexity of proposed model is defined below:The complexity of attention model is \(O\left( {n^{2} \cdot d} \right)\) , for recurrent network it is \(O\left( {n \cdot d^{2} } \right)\) , and the complexity of gated recurrent is found to be \(O\left( {k \cdot n \cdot d^{2} } \right)\) . The total complexity of proposed GARN is \(O\left( {k \cdot n^{2} \cdot d} \right)\) . This complexity shows that the proposed model has obtained efficient performance by reducing the system complexity. However, using the model separately won’t provide satisfactory performance. However, integration of such models has attained efficient performance than other existing methods.

GARN is preferred in this research to find the various opinions of Twitter online platform users. The implementation was carried out by utilizing the Sentiment 140 dataset. The performance of the leading GARN classifier is compared with other DL models Bi-GRU, Bi-LSTM, RNN and CNN for four performance metrics: accuracy, precision, f-measure and recall centred with four-term weighting schemes LTF-MICF, TF-DFS, TF-IDF, TF and W2V. The evaluation shows that the leading GARN DL technique reached the target level for Twitter sentiment classification. Additionally, while applying the suggested term weighting scheme-based feature extraction technique LTF-MICF with the leading GARN classifier gained an efficient result for tweet feature extraction. With the Twitter dataset, the GARN accuracy on applying LTF-MICF is 97.86%. The accuracy value attained by the proposed classifier is the highest of all the existing classifiers. Finally, the suggested GARN classifier is regarded as an effective DL classifier for Twitter sentiment analysis and other sentiment analysis applications. The proposed model has attained satisfactory result but it haven’t attained required level. This is because the proposed architecture fails to provide equal importance to the selected features. Due to this, few of the important features get lost, this has reduced the efficient performance of proposed model.Therefore as a future scope, an effective DL technique with the best feature selection method for classifying visual sentiment classification by utilizing all the selected features will be introduced. Further, this method is analysed using the small dataset, therefore in future large data with challenging images will be used to analyse the performance of present architecture.

Availability of data and materials

In this work, the dataset utilized in our proposed work contains 1,600,000 with score values for each tweets as, for positive tweets the rank value is 4 similarly for negative tweets rank value is 0 and for neutral tweets the rank value is 2 are collected using twitter api.

Change history

12 july 2023.

The typo in affiliation has been corrected.

Abbreviations

Deep Learning

  • Gated recurrent attention network

Log Term Frequency-based Modified Inverse Class Frequency

Hybrid mutation based white shark optimizer

  • Recurrent neural network

Natural Language Processing

Support Vector Machine

Naïve Bayes

Twitter Sentiment Analysis

Convolutional Neural Network

Term based random sampling

Saberi B, Saad S. Sentiment analysis or opinion mining: a review. Int J Adv Sci Eng Inf Technol. 2017;7(5):1660–6.

Article   Google Scholar  

Medhat W, Hassan A, Korashy H. Sentiment analysis algorithms and applications: a survey. Ain Shams Eng J. 2014;5(4):1093–113.

Drus Z, Khalid H. Sentiment analysis in social media and its application: systematic literature review. Procedia Comput Sci. 2019;161:707–14.

Zeglen E, Rosendale J. Increasing online information retention: analyzing the effects. J Open Flex Distance Learn. 2018;22(1):22–33.

Google Scholar  

Qian Yu, Deng X, Ye Q, Ma B, Yuan H. On detecting business event from the headlines and leads of massive online news articles. Inf Process Manage. 2019;56(6): 102086.

Osatuyi B. Information sharing on social media sites. Comput Hum Behav. 2013;29(6):2622–31.

Neubaum, German. Monitoring and expressing opinions on social networking sites–Empirical investigations based on the spiral of silence theory. PhD diss., Dissertation, Duisburg, Essen, Universität Duisburg-Essen, 2016, 2016.

Karami A, Lundy M, Webb F, Dwivedi YK. Twitter and research: a systematic literature review through text mining. IEEE Access. 2020;8:67698–717.

Antonakaki D, Fragopoulou P, Ioannidis S. A survey of Twitter research: data model, graph structure, sentiment analysis and attacks. Expert Syst Appl. 2021;164: 114006.

Birjali M, Kasri M, Beni-Hssane A. A comprehensive survey on sentiment analysis: approaches, challenges and trends. Knowl-Based Syst. 2021;226: 107134.

Yadav N, Kudale O, Rao A, Gupta S, Shitole A. Twitter sentiment analysis using supervised machine learning. Intelligent data communication technologies and internet of things. Singapore: Springer; 2021. p. 631–42.

Book   Google Scholar  

Jain PK, Pamula R, Srivastava G. A systematic literature review on machine learning applications for consumer sentiment analysis using online reviews. Comput Sci Rev. 2021;41:100413.

Pandian AP. Performance Evaluation and Comparison using Deep Learning Techniques in Sentiment Analysis. Journal of Soft Computing Paradigm (JSCP). 2021;3(02):123–34.

Gandhi UD, Kumar PM, Babu GC, Karthick G. Sentiment analysis on Twitter data by using convolutional neural network (CNN) and long short term memory (LSTM). Wirel Pers Commun. 2021;17:1–10.

Kaur H, Ahsaan SU, Alankar B, Chang V. A proposed sentiment analysis deep learning algorithm for analyzing COVID-19 tweets. Inf Syst Front. 2021;23(6):1417–29.

Alharbi AS, de Doncker E. Twitter sentiment analysis with a deep neural network: an enhanced approach using user behavioral information. Cogn Syst Res. 2019;54:50–61.

Tam S, Said RB, Özgür Tanriöver Ö. A ConvBiLSTM deep learning model-based approach for Twitter sentiment classification. IEEE Access. 2021;9:41283–93.

Chugh A, Sharma VK, Kumar S, Nayyar A, Qureshi B, Bhatia MK, Jain C. Spider monkey crow optimization algorithm with deep learning for sentiment classification and information retrieval. IEEE Access. 2021;9:24249–62.

Alamoudi ES, Alghamdi NS. Sentiment classification and aspect-based sentiment analysis on yelp reviews using deep learning and word embeddings. J Decis Syst. 2021;30(2–3):259–81.

Tan KL, Lee CP, Anbananthen KSM, Lim KM. RoBERTa-LSTM: a hybrid model for sentiment analysis with transformer and recurrent neural network. IEEE Access. 2022;10:21517–25.

Hasib, Khan Md, Md Ahsan Habib, Nurul Akter Towhid, Md Imran Hossain Showrov. A Novel Deep Learning based Sentiment Analysis of Twitter Data for US Airline Service. In 2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD), pp. 450–455. IEEE. 2021.

Zhao H, Liu Z, Yao X, Yang Q. A machine learning-based sentiment analysis of online product reviews with a novel term weighting and feature selection approach. Inf Process Manage. 2021;58(5): 102656.

Braik M, Hammouri A, Atwan J, Al-Betar MA, Awadallah MA. White Shark Optimizer: a novel bio-inspired meta-heuristic algorithm for global optimization problems. Knowl-Based Syst. 2022;243: 108457.

Carvalho F. Guedes, GP. 2020. TF-IDFC-RF: a novel supervised term weighting scheme. arXiv preprint arXiv:2003.07193 .

Zeng L, Ren W, Shan L. Attention-based bidirectional gated recurrent unit neural networks for well logs prediction and lithology identification. Neurocomputing. 2020;414:153–71.

Niu Z, Yu Z, Tang W, Wu Q, Reformat M. Wind power forecasting using attention-based gated recurrent unit network. Energy. 2020;196: 117081.

https://www.kaggle.com/datasets/kazanova/sentiment140

Ahuja R, Chug A, Kohli S, Gupta S, Ahuja P. The impact of features extraction on the sentiment analysis. Procedia Comput Sci. 2019;152:341–8.

Gupta B, Negi M, Vishwakarma K, Rawat G, Badhani P, Tech B. Study of Twitter sentiment analysis using machine learning algorithms on Python. Int J Comput Appl. 2017;165(9):29–34.

Ikram A, Kumar M, Munjal G. Twitter Sentiment Analysis using Machine Learning. In 2022 12th International Conference on Cloud Computing, Data Science & Engineering (Confluence) pp. 629–634. IEEE. 2022.

Gaye B, Zhang D, Wulamu A. A Tweet sentiment classification approach using a hybrid stacked ensemble technique. Information. 2021;12(9):374.

Ahmed K, Nadeem MI, Li D, Zheng Z, Ghadi YY, Assam M, Mohamed HG. Exploiting stacked autoencoders for improved sentiment analysis. Appl Sci. 2022;12(23):12380.

Subba B, Kumari S. A heterogeneous stacking ensemble based sentiment analysis framework using multiple word embeddings. Comput Intell. 2022;38(2):530–59.

Pu X, Yan G, Yu C, Mi X, Yu C. Sentiment analysis of online course evaluation based on a new ensemble deep learning mode: evidence from Chinese. Appl Sci. 2021;11(23):11313.

Chen J, Chen Y, He Y, Xu Y, Zhao S, Zhang Y. A classified feature representation three-way decision model for sentiment analysis. Appl Intell. 2022;1:1–13.

Jain DK, Boyapati P, Venkatesh J, Prakash M. An intelligent cognitive-inspired computing with big data analytics framework for sentiment analysis and classification. Inf Process Manage. 2022;59(1): 102758.

Download references

Acknowledgements

Not applicable.

Authors did not receive any funding for this study.

Author information

Authors and affiliations.

Department of Computer Science & Engineering, Koneru Lakshmaiah Education Foundation, Guntur-Dt, Vaddeswaram, Andhra Pradesh, India

Nikhat Parveen

Ton Duc Thang University, Ho Chi Minh, Vietnam

Nikhat Parveen & Amjan Shaik

ITM SLS Baroda University, Vadodara, Gujarat, India

Prasun Chakrabarti

Data Science Laboratory, Faculty of Information Technology, Industrial University of Ho Chi Minh, Ho Chi Minh, Vietnam

Bui Thanh Hung

Department of Computer Science & Engineering, St.Peter’s Engineering College, Hyderabad, India

Amjan Shaik

You can also search for this author in PubMed   Google Scholar

Contributions

NP and PC has found the proposed algorithms and obtained the datasets for the research and explored different methods discussed and contributed to the modification of study objectives and framework. Their rich experience was instrumental in improving our work. BTH and AS has done the literature survey of the paper and contributed writing the paper. All authors contributed to the editing and proofreading. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Nikhat Parveen .

Ethics declarations

Ethics approval and consent to participate, consent for publication, competing interests.

The authors declare that they have no Competing interests.

Additional information

Publisher's note.

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ .

Reprints and permissions

About this article

Cite this article.

Parveen, N., Chakrabarti, P., Hung, B.T. et al. Twitter sentiment analysis using hybrid gated attention recurrent network. J Big Data 10 , 50 (2023). https://doi.org/10.1186/s40537-023-00726-3

Download citation

Received : 30 June 2022

Accepted : 03 April 2023

Published : 17 April 2023

DOI : https://doi.org/10.1186/s40537-023-00726-3

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

  • Deep learning
  • Term weight-feature extraction
  • White shark optimizer
  • Twitter sentiment
  • Natural language processing

research paper on sentiment analysis of twitter data

  • DOI: 10.48175/ijarsct-18524
  • Corpus ID: 55349082

Sentiment Analysis of Twitter Data

  • Pattapu Shanmuk , Pothireddy Tarun , +8 authors Tiwari
  • Published in International Journal of… 26 May 2024
  • Computer Science

8 Citations

Twitter sentiment analysis based on us presidential election 2016, proposal of a method for the analysis of sentiments in social networks with the use of r, sentiment spreading: an epidemic model for lexicon-based sentiment analysis on twitter, sentiment-based data mining approach for classification and analysis, rumor detection and classification for twitter data, a primer on opinion mining: the growing research area, cryptocurrency – sentiment analysis in social media, understanding public preferences and trade-offs for government responses during a pandemic: a protocol for a discrete choice experiment in the uk, 23 references, like it or not, twitter sentiment analysis: the good the bad and the omg, twitter mood predicts the stock market, what's worthy of comment content and comment volume in political blogs, what is an opinion about exploring political standpoints using opinion scoring model, twitter: more than tweets for undergraduate student researchers, thumbs up sentiment classification using machine learning techniques, star quality: aggregating reviews to rank products and merchants, thumbs up or thumbs down semantic orientation applied to unsupervised classification of reviews, detecting malicious nodes in iot networks using machine learning and artificial neural networks, related papers.

Showing 1 through 3 of 0 Related Papers

IEEE Account

  • Change Username/Password
  • Update Address

Purchase Details

  • Payment Options
  • Order History
  • View Purchased Documents

Profile Information

  • Communications Preferences
  • Profession and Education
  • Technical Interests
  • US & Canada: +1 800 678 4333
  • Worldwide: +1 732 981 0060
  • Contact & Support
  • About IEEE Xplore
  • Accessibility
  • Terms of Use
  • Nondiscrimination Policy
  • Privacy & Opting Out of Cookies

A not-for-profit organization, IEEE is the world's largest technical professional organization dedicated to advancing technology for the benefit of humanity. © Copyright 2024 IEEE - All rights reserved. Use of this web site signifies your agreement to the terms and conditions.

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here .

Loading metrics

Open Access

Peer-reviewed

Research Article

Prediction of infectious diseases using sentiment analysis on social media data

Roles Conceptualization, Data curation, Formal analysis, Methodology, Resources, Software, Validation, Visualization, Writing – original draft, Writing – review & editing

Affiliation Department of Industrial & Systems Engineering, Dongguk University, Jung-gu, Seoul, South Korea

Roles Conceptualization, Formal analysis, Funding acquisition, Project administration, Supervision, Validation, Writing – original draft, Writing – review & editing

* E-mail: [email protected]

ORCID logo

  • Youngchul Song, 
  • Byungun Yoon

PLOS

  • Published: September 4, 2024
  • https://doi.org/10.1371/journal.pone.0309842
  • Reader Comments

Table 1

As the influence and risk of infectious diseases increase, efforts are being made to predict the number of confirmed infectious disease patients, but research involving the qualitative opinions of social media users is scarce. However, social data can change the psychology and behaviors of crowds through information dissemination, which can affect the spread of infectious diseases. Existing studies have used the number of confirmed cases and spatial data to predict the number of confirmed cases of infectious diseases. However, studies using opinions from social data that affect changes in human behavior in relation to the spread of infectious diseases are inadequate. Therefore, herein, we propose a new approach for sentiment analysis of social data by using opinion mining and to predict the number of confirmed cases of infectious diseases by using machine learning techniques. To build a sentiment dictionary specialized for predicting infectious diseases, we used Word2Vec to expand the existing sentiment dictionary and calculate the daily sentiment polarity by dividing it into positive and negative polarities from collected social data. Thereafter, we developed an algorithm to predict the number of confirmed infectious patients by using both positive and negative polarities with DNN, LSTM and GRU. The method proposed herein showed that the prediction results of the number of confirmed cases obtained using opinion mining were 1.12% and 3% better than those obtained without using opinion mining in LSTM and GRU model, and it is expected that social data will be used from a qualitative perspective for predicting the number of confirmed cases of infectious diseases.

Citation: Song Y, Yoon B (2024) Prediction of infectious diseases using sentiment analysis on social media data. PLoS ONE 19(9): e0309842. https://doi.org/10.1371/journal.pone.0309842

Editor: Shady Elbassuoni, American University of Beirut, LEBANON

Received: June 24, 2023; Accepted: August 20, 2024; Published: September 4, 2024

Copyright: © 2024 Song, Yoon. This is an open access article distributed under the terms of the Creative Commons Attribution License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Data Availability: All relevant data are within the paper and its Supporting Information files.

Funding: This work was supported by the National Research Foundation of Korea under Grant NRF-2021R1I1A2045721 and the funder had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Competing interests: The authors have declared that no competing interests exist.

Introduction

Infectious diseases are diseases that can spread from person to person and have continued to occur throughout human history. Since the first epidemic was recorded around 430 B.C., many infectious diseases have had huge impacts on mankind, such as the Black Death, smallpox, Spanish flu, and cholera. The Black Death killed approximately a third of Europe’s population, and smallpox has killed more than a billion people thus far. These disease epidemics have had major impacts on the overall economic conditions of the countries in which they occurred. COVID-19, which started in December 2019, has influenced many countries and has changed the lives of modern humankind. The World Health Organization (WHO) declared COVID-19 a pandemic, which is the highest risk level for infectious diseases, in March 2020. The declaration served as a starting point for the establishment of quarantine systems in each country in recognition of the severity of the pandemic. As human and property damage due to the COVID-19 pandemic increase [ 1 ], the pandemic can be classified as a social disaster that has caused large-scale damage at the national level. To date, the need to present health strategies for predicting infectious diseases and minimizing damage has emerged in the world, such as the implementation of distance-by-step and COVID-19 support policies.

With the increasing risk and impact of infectious diseases, researchers are uncovering the necessary data and methods to accurately forecast the number of confirmed cases. From a data perspective, most studies have employed daily confirmed case data to make predictions using regression or machine learning (ML) techniques [ 2 – 4 ]. In addition, some studies have been carried out to forecast the number of confirmed cases by identifying additional elements that influence the transmission of infectious illnesses, such as spatial data [ 5 , 6 ]. However, there is a notable deficiency in integrating the subjective parts of social data, such as sentiment analysis, into models used for predicting infectious diseases. Thus, our study anticipates that including social data with these parameters will yield advantages.

This study begins with the assumption that the spread of infectious diseases is related to the sentiment polarity of social media. If a lot of negative sentiments are posted on social media, people will act more carefully, reducing the spread of the epidemic, and if the word "it’s okay" comes out a lot, people will be able to act casually and speed up the spread of the epidemic. When information pertaining to the risk of the coronavirus is spread through social networks, negative events can be transmitted through repeated exposure, resulting in acute stress [ 7 ]. The stress of this infectious disease causes people to change their behaviors to cope with it [ 8 ]. Since the start of COVID-19, people using social media data have been used to understand public psychological responses related to infectious diseases. In a survey, 93.3% of respondents stated that they avoid going to public places, 89.6% of the respondents reduced holiday-related activities, and more than 70% of the respondents stated said they take precautions to avoid infection [ 9 ]. Changes in people’s behaviors and the implementation of preventive measures in infected areas can affect the population density and quarantine, thereby curbing the spread of infectious diseases [ 10 – 12 ]. Therefore, it is considered meaningful to predict the number of confirmed infectious disease cases by analyzing people’s opinions pertaining to infectious diseases on social networks. This study aims to predict the number of confirmed cases of infectious diseases by using anonymized social media data containing collective public opinions on infectious diseases.

Considering this perspective, search volumes were used to predict the number of confirmed cases [ 13 ]. Sentiment analysis was conducted to explore the qualitative aspect of social data, and in [ 14 ], the number of future vaccinations was predicted on the basis of an setiment analysis of tweet data. To predict the number of confirmed infectious disease patients, daily numbers of confirmed cases and quantitative approaches to social and public data are being used. However, the above-referenced studies reflecting the qualitative characteristics of social data, which affect people’s psychology in terms of the number of confirmed infectious disease patients, are insufficient. Therefore, this study analyzes the qualitative characteristics of social data by means of opinion mining to check whether there exists a relationship between people’s sentiment states and prediction of the number of confirmed cases.

The motivation for this study lies in the observation that the social networking behavior of individuals can have an impact on the transmission of infectious diseases. Therefore, it is important to take this factor into account when forecasting the number of confirmed cases. This study utilizes data from social network services (SNS) to examine how the public responds to information about infectious diseases. It uses sentiment analysis, a method within the field of opinion mining, to analyze the sentiment expressed in these answers. The sentiment data that is retrieved is subsequently employed to forecast the quantity of confirmed cases of infectious diseases by utilizing machine learning models, with the objective of evaluating the accuracy of the predictions. The key findings of this study indicate that incorporating social media sentiment data into infectious disease prediction models results in better predictive performance compared to models that do not consider such data. This underscores the potential significance of social media data in improving the accuracy of infectious disease predictions. The study is structured as follows. Background explains the background theory of the contents covered in this study. Research Framework explains the research framework. The methods used herein are described in Results, and the results obtained using these methods are presented in Implications & Discussion. Finally, Conclusion presents the limitations and future directions of this research.

In this section, we review the extant literature on epidemic prediction, latest opinion mining processes, and ML models used for time-series prediction. First, we review how studies on infectious disease prediction have been conducted thus far, ML techniques used herein to predict the number of confirmed cases, and methods for opinion mining of social data.

Predicting infectious diseases

To predict infectious diseases, Kemack and McKendrick proposed an infectious disease spread model by devising an SIR (Susceptible, Infectious, Recovered) model that considers uninfected, infected, and recovered people [ 15 ]. Assuming that all populations have the above population configuration, a series of differential equations were used to indicate the state of the overall population in terms of the number of infections. In this model, the formula was completed using the infection rate and recovery rate for each infectious disease, and studies on infectious diseases are still being conducted by using the SIR model and the modified SEIR (Susceptible, Exposed, Infectious, Recovered) model [ 16 – 18 ].

Moreover, in recent studies, with the advancement of artificial intelligence (AI), the number of confirmed infectious disease patients has been predicted using the ML and deep learning (DL) approaches, which are unlike the conventional model. The AI-based approaches consider diverse variables that affect infection, rather than merely considering the infection rate and recovery rate, which represent the unique characteristics of existing infectious diseases. This improves the prediction ability in dynamic situations. The number of confirmed cases in the early stages of COVID-19 was predicted using the ARIMA and TP-SMM-AR self-regression time-series models, respectively [ 19 ]. The Holt’s time series model was also used for forecasting confirmed cases, relying solely on global confirmed case data to predict future cases [ 4 ]. The ARIMA, Holt, Splines, and TBATS models were also used to predict confirmed cases, deaths, and cured cases of And USA and Italy [ 20 ]. In another study, simulations were conducted to create confirmed scenarios, and the impact and transmission order of spread were studied [ 5 ]. In studies using ML and DL, DNN, LSTM and gated recurrent unit (GRU) were used to predict the number of confirmed infectious disease patients [ 2 , 6 , 18 , 21 – 24 ]. In addition, several ML techniques (K-nearest neighbor (KNN), support vector machine (SVM), and random forest (RF)) have been used to predict the number of people vaccinated [ 14 ]. The study exploited past pandemic case data to create a nonlinear autoregressive neural network time series model for forecasting confirmed cases. The studies primarily focused on making time series forecasts using solely confirmed case data, but also using other forms of data such as spatial data. While several studies have made predictions about the number of confirmed cases based on social data, they mostly relied on quantitative indicators obtained from social networks [ 13 ]. The models and data used in the previous studies are shown in Table 1 . Some of these studies argue that social information can be analyzed for predicting confirmed infectious disease patients.

thumbnail

  • PPT PowerPoint slide
  • PNG larger image
  • TIFF original image

https://doi.org/10.1371/journal.pone.0309842.t001

The best tools and data for predicting a dynamic epidemic such as COVID-19 are not specified. The data and tools that can be used to predict infectious diseases continue to be discovered to date. From the data perspective, a model that employs the results of opinion mining of social data can be tried.

Opinion mining

Opinion mining is a big data analysis technique for analyzing and processing vast amounts of social text data. At the system level, it calculates the sentiment polarity of text sentences and is also called sentiment analysis. Many people read other people’s writings, and their behaviors are influenced by these writings, which can be analyzed through sentiment analysis [ 25 , 26 ]. Sentiment analysis yielded significantly superior results on opinion-classification tasks than those of other text mining approaches [ 27 ]. Opinion mining can be used to identify people’s behavioral characteristics and expected phenomena through trend analysis and future prediction by using large numbers of opinions published on the Internet. The opinion mining of text data related to a specific topic facilitates the development of interesting approaches to the topic. An example is Obama’s successful 2012 election campaign, in which opinion mining was used, and analyses of buyers and users’ reviews by using opinion mining to gain insights in many customer analysis studies [ 28 – 30 ].

Usually, the process of opinion mining is as follows. First, the study targets are identified, and data with characteristics that the targets write or represent the target is collected and preprocessed. Thereafter, attributes such as opinions and attitudes, degrees of positivity/negativity, and satisfaction are used to select the characteristics to be extracted from the data. In the sentiment analysis conducted herein, positive/negative values are extracted, and to extract polarities, sentiment dictionaries and rule-based polarities are typically derived. Sentiment dictionary can analyze text data by using the words, rules, and polarities predefined in the sentiment dictionary to calculate positive/negative values depending on keyword appearance or rules [ 29 – 31 ]. Recently, a method of sentiment classification using ML and DL was studied [ 31 ].

Studies on the sentiment dictionaries used in sentiment analysis are being conducted. Because sentiment dictionaries use predefined values, it is important to build a sentiment dictionary that tailored to the corpus being analyzed. In previous studies, sentiment dictionaries were expanded successfully by using Word2Vec. Word2Vec is a word embedding technique that was introduced in 2013, and it uses a continuous bag of words (CBOW) learning method that predicts one blank by using multiple inputs and a skip-gram learning method that predicts surrounding blanks by using one input. The words learned in this manner have their respective vector values. In previous studies, the existing sentiment dictionaries were expanded using the cosine similarity of the Word2Vec results, and word dictionaries that were better optimized for the dataset to be analyzed were established [ 32 – 34 ]. In this study, sentiment analysis of social data is conducted by producing an extended sentiment dictionary by using Word2Vec in line with the changing characteristics of the existing sentiment dictionaries and social data.

Machine learning

ML is being used in many predictive studies. ML is mainly divided into guidance, semi-supervised, and unsupervised learning depending on the learning method. Although ML is a black box model, meaning that how the model arrives at its results is not known, it is generally used in many fields such as recognition, classification, and prediction. Moreover, many predictive studies are underway to demonstrate strengths in the field of time-series prediction, and RNN techniques specialized for time-series analysis by remembering existing data are available. In addition, LSTM and GRU techniques have been derived from RNN. These models continue to be used for predicting infectious diseases. The present study aims to predict the number of confirmed infectious disease patients by using a deep neural network (DNN), a basic machine learning technique, in conjunction with LSTM and GRU specialized for time-series analysis.

A DNN is an artificial neural network that calculates outputs by multiplying weights across multiple hidden layers [ 35 ]. The DNN structure, illustrated in Fig 1 , consists of an input layer, a hidden layer, and an output layer. These layers are connected to each other, and values are transformed and moved by using weights and activation functions. Each weight is modified by learning, and the network is created using the modified weights. DNNs are mainly used in supervised learning to solve classification and regression problems. When the predetermined learning process is completed, the result value of the new input value is derived using the final calculated weight. This DNN structure is also used for various tasks by connecting it to other ML techniques.

thumbnail

https://doi.org/10.1371/journal.pone.0309842.g001

LSTM is a circular neural network technique that was developed to overcome the limitations of RNN, which exhibits reduced learning ability owing to weak influence of past information [ 36 ]. The structure of LSTM is depicted in Fig 2 , and LSTM learns by controlling the memory or by forgetting past information. In the figure, the flow of Ct refers to the cell state of the previous data; new information and previous ht are used to decide whether to preserve or discard information; input gate is added and multiplied using the sigmoid and tanh functions; and, finally, cell state is updated. In the output gate, ht is calculated using the sigmoid and tanh functions, which represents the short-term memory status and is identical to the value calculated in the corresponding cell and flowing out to the output. In conclusion, the result value is learned and derived using long-term memory, short-term memory, and new input information. LSTM with these characteristics is widely used for time-series analysis, and specifically, it is useful for time-series analysis involving volatility. The LSTM model has also been used from a time-series perspective in extant studies on predicting confirmed infectious disease cases [ 2 , 6 , 21 ].

thumbnail

Structures of LSTM (left) and GRU (right).

https://doi.org/10.1371/journal.pone.0309842.g002

The GRU model evolved from LSTM, and it simplifies LSTM to reduce learning time, thus resulting in similar performance but faster data learning [ 37 , 38 ]. Unlike LSTM, GRU has a reset gate and an update gate, where the reset gate calculates the degree of reflection of the previous state (ht), and its role is similar to that of the forget gate. Meanwhile, the update gate determines the rate at which to reflect the previous state (ht) and the current input state ( Fig 2 ). As with LSTM, the GRU model, too, has been used extensively for time-series analysis in recent years, and it has been used in studies on predicting the number of confirmed cases of infectious diseases [ 22 , 24 ].

Research framework

Overall framework.

In this study, data were obtained from Twitter, a social networking service (SNS) where one can freely write their thoughts, Pre-processing and part-of-speech (POS) tagging of these data were performed, and the positive/negative polarities of each tweet were derived daily using a sentiment dictionary. The number of confirmed cases was predicted through ML shown in Fig 3 .

thumbnail

https://doi.org/10.1371/journal.pone.0309842.g003

Data collection and preprocessing

Among various SNS data, the tweet data of Twitter ( https://twitter.com/ ) can be accessed by everyone. Moreover, people can freely express their thoughts on Twitter, and the amount of data on Twitter is adequate for analysis. Owing to these characteristics, this study preemptively found Twitter data to be suitable for use in this study. Tweet data containing keywords related to COVID-19 were extracted from Twitter. Tweet data of 30 months after the first confirmed case of COVID-19 were collected using Python by the collection and analysis method complying with the terms and conditions for the source of the data. The number of COVID-19 confirmed patients used in the study is collected at the Seoul Open Data Plaza ( https://data.seoul.go.kr/ ). Duplicate data were deleted from the collected social data, and news data and promotional posts that did not contain user opinions were excluded. Thereafter, data in Korean only were created through preprocessing, and POS tagging was performed using Kkma.

Opinion mining on social data

This study assumes that the information from social data can influence the spread of infectious diseases and that utilizing this data can lead to more accurate predictions of the number of confirmed cases. Therefore, the proposed methodology employs sentiment analysis of opinion mining to extract meaningful information from the social data. The opinion mining method used herein calculates the polarity of a sentence in terms of the average of polarities from the word perspective to determine the polarity of each text data. To start this process, it is necessary to define a sentiment dictionary to set the polarity of each word. Although a Korean-language sentiment dictionary is available, it has been expanded to match the characteristics of the SNS data collected using the Korean Sentiment Analysis Corpus (KOSAC) Korean sentiment dictionary [ 39 ], which, according to previous studies [ 27 , 40 ], provides better results if a sentiment dictionary is written considering the characteristics of the each document.

In previous studies, the cosine similarity of Word2Vec was used to successfully expand the sentiment dictionary [ 32 – 34 ]. Therefore, in this study, the expansion of the sentiment dictionary using Word2Vec is confirmed to be necessary for better sentiment analysis. Polarities are determined based on the cosine similarity of words corresponding to positive/negative words by using the Word2Vec method. In case of the existing KOSAC Korean sentiment dictionary, each word has a label value for positive/negative as +1 for positive, -1 for negative, and 0 for neutral.

The Word2Vec model learned the collected 1.08 million text data. Between the CBOW and Skip-Bow learning models, we used the Skip-Bow model, which learns more data. This model was trained by setting the minimum number of appearances to 100, which was 0.01% of the amount of text data collected. By using the produced sentiment dictionary, positive/negative words and words with high cosine similarity were extracted by inputting words of sentiment dictionary into the Word2Vec model. Cosine similarity is calculated as shown in Eq1. Studies have demonstrated that a sentiment dictionary can be established successfully when the similarity is 0.5 or higher [ 34 ], and in this study, this study expanded the sentiment dictionary by considering a word an equivalent word with the same positive/negative label when the similarity of the word was 0.8 or higher to ensure high reliability ( Fig 4 ). If a particular word originated from both positive/negative labels, the mean of cosine similarity was checked to provide a more similar positive/negative label.

research paper on sentiment analysis of twitter data

https://doi.org/10.1371/journal.pone.0309842.g004

The average polarity of each tweet was calculated by substituting the text data with adjectives, verbs, adverbs, nouns, and radix polarities in the produced sentiment dictionary ( Table 2 ). Thereafter, the polarities of the daily text data were collected, and the daily polarity was calculated and used as the input to the model for predicting the number of confirmed patients. The formula for calculating the sentiment value of each tweet is given in Eq2. In Eq2, t represents each tweet, x represents the number of words in t that have sentiment polarities, and w represents the word in set x.

research paper on sentiment analysis of twitter data

https://doi.org/10.1371/journal.pone.0309842.t002

Predicting number of confirmed cases

Based on successful cases of predicting the number of confirmed cases using machine learning, this study also employs models from the machine learning family (DNN, LSTM, GRU) that have demonstrated high effectiveness [ 2 , 6 , 18 , 21 – 24 ]. In this part, predictions with and without daily positive/negative polarities obtained from opinion mining are compared. First, predictions were generated using the DNN, LSTM, and GRU models by using only the number of confirmed patients per day, and predictions were generated under the same conditions by including the positive/negative polarities. To compare the prediction accuracy in this process, the Mean Absolute Percentage Error (MAPE), which calculates the ratio of the difference between the predicted value and the actual value according to the characteristics of the number of confirmed patients with a large range, was used. To predict the number of confirmed cases of infectious diseases, the DNN, LSTM, and GRU ML models consisting of two hidden layers, as shown in Fig 5 , were applied to finally predict linear values. The data used for prediction were the daily positive/negative polarities extracted in opinion mining on social data part and the data on the number of confirmed patients in Korea. These data were divided in a 7:3 ratio into the learning dataset and verification dataset, and the prediction model was applied to these two datasets. An example of input data is depicted in the blue box in ( Fig 6 ). After predicting the number of confirmed cases on the next day by using the daily number of confirmed cases and positive/negative polarities of n-days before the forecast date, the MAPE values of the actual and predicted values were calculated to measure the prediction accuracy.

thumbnail

https://doi.org/10.1371/journal.pone.0309842.g005

thumbnail

https://doi.org/10.1371/journal.pone.0309842.g006

Before executing the final prediction algorithm, the number of confirmed cases and the daily polarity calculated in opinion mining on social data part, were applied to the model as input values, and the optimal model and duration were confirmed by conducting several experiments. Subsequently, in this study, the predicted number of confirmed cases on the next day obtained by using only the data of the number of confirmed cases and the prediction results obtained using daily polarities are compared to confirm the prediction accuracy ( Fig 5 ). The input data are used as daily polarities, and the number of confirmed cases of n-days before the forecast date and MAPE values are calculated by comparing the predicted and actual values of the next day to confirm the results.

Search terms were collected using a total of five words, including four Corona-related words (“Corona,” “COVID-19,” “COVID-19 confirmed and “COVID-19 Vaccine” based on Google Trends) and “epidemic.” Prior to collecting data for machine learning techniques, this study considered whether a small amount of data could be used. To measure the daily number of confirmed cases of infectious diseases, data from when the epidemic is active should be used, because there were numbers of units that did not fit perfectly in the category of big data. However, recent papers predicting the number of confirmed cases of infectious diseases using machine learning have also been confirmed using a small amount of data like Table 3 . Therefore, although limited in this study, the prediction was conducted using 756 points of data. In addition, fields that require actual infectious disease prediction will also require rapid response, and the model proposed in this study reflects situations in which they are forced to use less data.

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t003

The data-collecting period spanned from February 24, 2020, to March 21, 2022. A total of 1,080,000 data points were obtained after undergoing preprocessing procedures to exclude duplicate or missing information, as well as advertisement messages from the social media site (Twitter). The collected data include both the date and the corresponding text generated. A total of 1,423 data points were gathered on a daily basis, with a standard deviation of 318.23. Furthermore, data regarding the number of confirmed COVID-19 cases in Korea within the aforementioned time frame was also gathered. POS tagging of these text data was performed using a Kkma POS tagger, and finally, the data were produced, as summarized in Table 4 .

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t004

To match the data collected in the KOSAC Korean sentiment dictionary and the social data, a sentiment dictionary was produced using the Word2Vec technique. Before Word2Vec was used, it learned the entire POS-tagged text data summarized in Table 1 .The minimum number of appearances was 100, which accounted for 0.01% of the total sentence data, and the Skip-Bow model was used as the learning method. As the input data, words from the KOSAC sentiment dictionary were inserted, and words with a cosine similarity of 0.8 or higher, derived through Word2Vec, were added to the new sentiment dictionary because they were considered to have the same positive/negative sentiment polarities. To account for the morphemes of the words, an sentiment dictionary comprising nouns, verbs, adverbs, and adjectives was collated, and a total of 3,070 sentiment words and values were finally extracted ( Table 5 ).

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t005

The average of polarities was calculated for each text data collected using the produced sentiment dictionary. The decision was made considering the two methods used to calculate the daily polarity values from the text data polarity values. As illustrated in Fig 7 , Case 1 has positive and negative sentiment polarities from -1 to 1 on each date, and Case 2 uses two input data that are calculated daily by separating texts with positive polarities from those with negative polarities.

  • Case 1: Using the average of daily polarities
  • Case 2: Using the mean of each positive and negative daily polarities

thumbnail

https://doi.org/10.1371/journal.pone.0309842.g007

The final calculation method was the one that yielded the better prediction results in terms of the number of confirmed infectious disease patients. As a comparative index of the final prediction result, the MAPE values of the predicted and measured values were used, and the results are summarized in Table 6 . In terms of minimum value, the MAPE values were 11.57% in Case 1 and 10.09% in Case 2. Therefore, as indicated by Case 2 in Fig 7 , the method of calculating the polarity by dividing it into positive and negative was adopted. Table 7 summarizes the polarity of each text data, and Table 8 is a normalized table containing the average values obtained by dividing the daily polarity by positive and negative polarities. The daily polarity represents the degree of positive/negative COVID-19-related opinions of users in the text data obtained from SNS on the corresponding date, and it is finally input into the prediction model in the form of Table 8 .

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t006

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t007

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t008

Predicting the number of confirmed cases

In this section, the number of confirmed cases is predicted using DNN, LSTM, and GRU, which are the machine learning models proposed in the research framework. The input values of the model include the number of confirmed cases in Korea between February 24, 2020, and March 21, 2022, which is the period when the number of confirmed cases appeared steadily in Korea; number of confirmed cases; and positive/negative polarities derived through opinion mining. The data were divided in a ratio of 7:3 to obtain the training and verification datasets, and learning was performed. As for the activation function of DNN, the RELU function with the best results was applied after comparing the experimental results of the sigmoid, RELU, and softmax models; the epoch of each model was set to 500, and learning was performed. The results were confirmed using the Adam optimizer, which yielded the best experimental results among the candidate optimizers, namely Root Mean Square propagation(RMSP), Stochastic Gradient Descent(SGD), Adaptive Moment Estimation(Adam), and Nesterov Accelerated Gradient Adam(Nadam).

The prediction results were organized, as shown in Table 9 , depending on whether the daily polarities were included and by considering the scope of data application. Depending on the presence or absence of polarities, the daily polarity data were divided into applied and notapplied. The prediction inclusion period was used to set the number of data matches required to generate predictions based on the prediction date. For example, if the prediction inclusion period was 14, the value of the prediction point was calculated using the data of 14 days, including the day before the prediction point. In this study, 7 days, the average incubation period expected by the Korea Centers for Disease Control and Prevention; 14 days, the longest officially announced incubation period; and 28 days, the period considering the impact of the previous incubation period due to the nature of the epidemic were used. The MAPE, MSE, RMSE, MAE results summarized in Table 9 were expressed as the average of 30 prediction results. The number of confirmed cases of infectious diseases has an exponential characteristic. Therefore, if the results are presented using only error figures such as MSE, RMSE, and MAE, the MAPE value that can be expressed as a ratio of errors is presented in this study because a model that performs prediction well may be judged to be better when the number of confirmed cases is relatively large.

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t009

The study found that the GRU model achieved the lowest error rate value of 10.093%, including polarities, for a 14-day period. This aligns with the expected incubation period for COVID-19 (1–14 days) announced by the Korea Centers for Disease Control and Prevention. Furthermore, for DNN, the data without polarities exhibited greater predictive power ( Fig 8 ). Conversely, the RNN family models—LSTM and GRU—achieved satisfactory prediction outcomes when utilizing data that had polarities (Figs 9 and 10 ). A t-test was performed to compare the accuracy of 100 learning/test runs using LSTM and GRU models on 14-day data. The comparison was done using both data sets, with and without sentiment polarities. The t-tests resulted in p-values of 1.28e-09 for LSTM and 5.92e-153 for GRU. These values indicate that the results obtained from data that included polarities were statistically significantly superior than those obtained from data that excluded polarities. The analysis and evaluation of 100 learning/test runs highlight the strength and reliability of the findings.

thumbnail

DNN results obtained using 14-day data with polarity excluded (left) and included (right).

https://doi.org/10.1371/journal.pone.0309842.g008

thumbnail

LSTM results obtained using 14-day data with polarity excluded (left) and included (right).

https://doi.org/10.1371/journal.pone.0309842.g009

thumbnail

GRU results obtained using 14-day data with polarity excluded (left) and included (right).

https://doi.org/10.1371/journal.pone.0309842.g010

In addition to the t-test, a binomial test was performed to verify the statistical significance of the win/loss information for each trial. This is crucial because the proposed strategy might "lose" more comparisons but still have a lower average, or alternatively, "win" more comparisons in both the 14 days and 28 days settings but have a lower average in the 28 days setting. For the LSTM results over a 14 days period, the model that included polarities won 82 out of 100 comparisons. This result allowed to reject the null hypothesis that the win probabilities of the two models are equal, with a p-value of 6.14e-11. In the 14 days GRU comparison, which demonstrated the best predictive performance, the model including polarities won all 100 comparisons. These results strongly support that the proposed feature is more significant when it comes to the actual model training. This analysis confirms the effectiveness of the proposed strategy and highlights the importance of incorporating polarities into the model for better predictive performance.

This study also compares its results with other research methods. This work selects the ARIMA model, which utilizes machine learning to make predictions based on time series data [ 19 , 20 ]. Prior research has indicated that the ARIMA model outperforms the Holt, Splines, and TBATS models in predicting the number of confirmed cases on weekly intervals [ 20 ]. Hence, in order to assess performance, this study used the approach of forecasting the weekly count of confirmed cases and thereafter comparing the results. The comparison is made by displaying the MAPE values at weekly intervals starting from the initial prediction date [ 20 ]. The ARIMA model, which demonstrated superior accuracy in prior research, is being compared by the results obtained for situations with and without sentiment polarity. The model’s performance is adequate for forecasting the number of COVID-19 cases in Korea and was evaluated using the ARIMA (2,1,3) parameters suggested in [ 41 ]. Table 10 shows the MAPE values for these models during a six-week period starting from the prediction’s initial date. It also presents a comparison of their average values over the entire period. On average, the GRU model outperformed the ARIMA model in terms of MAPE performance, as indicated by the comparison results. In addition, while evaluating the average performance over the entire period, it was found that the GRU model outperformed the ARIMA model (Table 10 ). This study examines the impact of incorporating sentiment polarity on the quality of results. The trials utilizing the ARIMA model also indicate that the results, which incorporate the sentiment polarities, show some improvement. Furthermore, with the exception of the data from Period1, the study consistently validated that the models incorporating GRU and sentiment polarity had superior performance on average. This comparison highlights the significance of taking sentiment polarity into account when making predictions. It demonstrates that the findings obtained by including sentiment polarity had reduced MAPE values, even when it is used in the method of previous studies.

thumbnail

https://doi.org/10.1371/journal.pone.0309842.t010

Implications & discussion

The results of this study indicate whether the qualitative opinions in social data were considered when predicting the number of confirmed infectious disease patients. In addition, the prediction results obtained using various ML models (DNN, LSTM, GRU) are presented. Finally, the best predictive power was obtained when the GRU model was applied to the data that included polarities. Moreover, all RNN family models yielded statistically significantly better predictive results when using the data that included polarities. According to the LSTM and GRU prediction graphs in Figs 9 and 10 obtained using the data that included or excluded polarities, respectively, the predicted values are smooth when the polarities are excluded, but they have trailing graphs. Trailing graphs indicate low efficiency in real environments. Trailing graph responds late to the forecast flow because it is similar to the amount of data immediately preceding it. This can make it difficult to utilize the prediction results. By contrast, when the polarity is included, the graph is relative rough, but it seems to yield a predictive value that is appropriate for the timing. In addition to the MAPE set as the error value, the characteristics of the graph showed more remarkable results. In addition, the results were compared using the ARIMA model among previous research methods, and it was also confirmed that the model with GRU and sentimental polarity showed the best performance. Therefore, according to our study, better predictive are generated by considering the qualitative characteristics of social data in the prediction process. Additionally, in this study, a model was developed to reduce errors in the predicted and measured values of the number of confirmed cases, but it is expected that it will be developed as a more effective model if a model for rise and fall is presented for future purposes.

During the research process, two methods for calculating the daily polarity were proposed to predict the number of confirmed patients. The first method involved viewing all polarities as an average for each day, and the second method involved calculating the positive and negative polarities separately. As a result of the experiment, the average was obtained by dividing the positive and negative polarities, and when this method was applied to the prediction model, the prediction accuracy increased. The reason for the application of this method was that if multiple data were to be combined using the central limit theorem, the value would remain at a certain level, which would reduce the data dimension that could be expressed for each degree. Moreover, the results were superior when multiple data were included. In future studies on opinion mining and sentiment analysis, it will be possible to consider the method of using polarities by dividing positive and negative properties. In this study, when applying opinion mining to social data, only the method that considered the frequency of words in the existing sentiment dictionaries was used. In future research, this part will be supplemented to reflect advanced research on opinion mining methods. Recently, with the advancement of NLP in the opinion mining and sentiment analysis domains, many studies have been conducted. For example, studies that measure polarities of social data through the use of Transformers, including BERT, are actively underway, and if these tools can analyze polarities from various angles and reflect them, more useful and improved research results can be expected.

It was also meaningful to confirm the data period for predicting the number of confirmed cases in this study. The incubation period proposed by the Korea Centers for Disease Control and Prevention was considered to determine the period for including previous data as the input data before generating predictions using the ML model. The Korea Centers for Disease Control and Prevention announced that the average and maximum incubation periods were 7 days and 14 days, respectively. Therefore, this study was conducted for up to 28 days in consideration of the average incubation period of 7 days, longest incubation period of 14 days, and the 14 day period before the infected person was affected. According to the study results, the LSTM and GRU models yielded the best predictions when using 14day data that included polarities. The meaning of 14 days overlaps with the meaning of 2 times the average incubation period of 7 days suggested by the Korea Centers for Disease Control and Prevention and the maximum incubation period of 14 days. These results suggest that further analysis is necessary to determine the significance of the relationship between the incubation period announced by the Centers for Disease Control and Prevention and the use of social data to predict infectious diseases.

In the social data covered intensively in this study, new words or new expressions appear over time owing to the characteristics of language. In this study, this study proposed a method for including these expressions in sentiment analysis by developing an existing sentiment dictionary using Word2Vec. This method can automatically collect data that reflect the changing characteristics of SNS language without needing a qualitative process involving experts. In addition, it is possible to update the sentiment dictionary to reflect the newly emerging language trends and conduct sentiment analysis automatically. This feature ensures that the proposed model can be updated and applied at a certain point in time in the future. In order to utilize the results of this study, users can collect social data containing the degree of positivity to infectious diseases and use the extracted sentiment polarities of each content as a parameter for infectious disease prediction algorithms. In order to extract the sentiment polarity of each data, an sentiment dictionary must be established considering the characteristics of each language, and it is expected that analysis can be performed according to the characteristics of each country and epidemic spread. Predicting the number of confirmed cases of the pandemic will keep individuals alert, enable policymakers to pre-imagine health-related resources and personnel plan, and allow them to move toward a quick end to the pandemic, taking into account when planning a response to preventive measures to prevent it.

Notwithstanding these contributions, it should be noted that the findings being given are applicable only to particular places and circumstances. This study employed qualitative aspects of social data to forecast the number of confirmed instances of infectious illnesses. To ensure accurate utilization, it is important to account for the amount of people engaged in social data and the regional influence of such data. Furthermore, it is important to incorporate variations in language and grammar structures, disparities in social media usage and recognition patterns, as well as cultural norms and frequency of social media engagement across different nations, since these factors can significantly impact social media dynamics and user behavior. This article presents the findings of a research endeavor that involved the development and validation of an epidemic prediction model. The model was constructed by leveraging opinion mining outcomes derived from social data in Korea, a country characterized by dense population and extensive utilization of social network services. In the future, it will be necessary to construct models using opinion mining in various languages and nations.

This study aimed to propose a methodology for predicting the number of confirmed cases of infectious diseases by using opinion mining, which allows for the inclusion of qualitative opinions from social data in epidemic prediction. To this end, about 1 million SNS Twitter data were collected, and the Word2Vec model was learned using the collected social data to expand the existing sentiment dictionary for sentiment analysis. After that, a model was developed to predict the number of confirmed COVID-19 patients by using the calculated sentiment polarities, and predictions were generated. As a result, when predicting using sentiment polarities, the predictive performances of LSTM and GRU increased by 1.12% and 3%, respectively, compared to those when sentiment polarities were not used, and these differences were statistically significant. These results also confirmed the differences through a binomial test for the win/loss of the two model outcomes, and the results were compared using the periodical model comparison method utilized in previous studies. Despite these comparisons, it was shown that using sentiment polarities from social data for prediction is more significant. Additionally, these results indicate that it is possible to predict the number of confirmed cases by continuously monitoring both the number of confirmed cases and the sentiment state.

Through continuous monitoring of social sentiment states, it is possible to develop and adjust policies that reflect changes in public perception. Policymakers can evaluate the effectiveness of policies based on real-time sentiment data and swiftly adjust them as needed to meet public demands. In addition, it is possible to prevent the spread of misinformation and gain public trust. Based on the results of social media sentiment analysis, tailored messages can be crafted and distributed to the public, and communication strategies can be established to promptly counteract misinformation.

However, the study has limitations in terms of the data and models used therein. In the collection of social data, the data of other media and news cannot be included by analyzing only Twitter data. In case of the model, the comparative analysis results presented herein consider only the DNN, LSTM, and GRU ML models. In addition, as an opinion mining method, only sentiment analysis was used considering the appearance frequencies of positive/negative keywords in the sentiment dictionary.

In the future, studies should be to collect large volumes of high quality social data, conduct experiments using predictive models that are based on methods different from those used in this study, and present a model that predicts a week or longer ahead to produce practical results. In addition to sentiment analysis, the opinion methodology can be confirmed through future tasks to derive results by using various recently emerged models, including DL.

This study started with the aim of improving the prediction of the number of confirmed patients by incorporating sentiment polarities from social data. The results confirmed that including polarity allowed for statistically significantly higher accuracy in predictions compared to excluding polarity. While many previous studies relied solely on quantitative social data, this study highlighted the importance of qualitative opinions from social data in predicting the number of confirmed infectious disease patients. Therefore, it underscores the need for further research using social data and opinion mining in the field of infectious disease prediction.

Supporting information

S1 data. collected social data1..

https://doi.org/10.1371/journal.pone.0309842.s001

S1 File. Collected social data2 and Korea’s daily number of confirmed cases.

https://doi.org/10.1371/journal.pone.0309842.s002

  • View Article
  • Google Scholar
  • PubMed/NCBI
  • 25. Liu B., Sentiment analysis and opinion mining. 2022: Springer Nature.
  • 28. Gräbner D., et al., Classification of customer reviews based on sentiment analysis, in Information and communication technologies in tourism 2012. 2012, Springer. p. 460–470.
  • 30. Singla Z., Randhawa S., and Jain S. Sentiment analysis of customer product reviews using machine learning. in 2017 international conference on intelligent computing and control (I2C2). 2017. IEEE.
  • 37. Cho K., et al., Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
  • 38. Chung J., et al., Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
  • 39. Jang H., Kim M., and Shin H. KOSAC: A full-fledged Korean sentiment analysis corpus. in Proceedings of the 27th Pacific Asia Conference on Language, Information and Computation. 2013. Waseda University.

Occupational groups prediction in Turkish Twitter data by using machine learning algorithms with multinomial approach

New citation alert added.

This alert has been successfully added and will be sent to:

You will be notified whenever a record that you have chosen has been cited.

To manage your alert preferences, click on the button below.

New Citation Alert!

Please log in to your account

Information & Contributors

Bibliometrics & citations, view options, recommendations, predicting trends in the twitter social network: a machine learning approach.

The Twitter microblogging site is one of the most popular websites in the Web today, where millions of users post real-time messages (tweets) on different topics of their interest. The content that becomes popular in Twitter (i.e., discussed by a ...

A machine learning approach for celebrity profiling

The celebrity profiling is used to predict the sub-profiles like gender, fame, birth-year and occupation of a celebrity for a given textual content. The task of celebrity profiling is introduced in PAN Competition 2019. Most of the researchers in the ...

Hate speech detection on Twitter using transfer learning

  • The results show that using transfer learning with BERT architecture gives best results on our dataset.

Social Media has become an ultimate driver of social change in the global society. Implications of the events, that take place in one corner of the word, reverberate across the globe in various geographies. This is so because the huge ...

Information

Published in.

Pergamon Press, Inc.

United States

Publication History

Author tags.

  • Occupation prediction
  • Machine learning
  • Turkish twitter data analysis
  • Multinomial approach
  • Data mining
  • Research-article

Contributors

Other metrics, bibliometrics, article metrics.

  • 0 Total Citations
  • 0 Total Downloads
  • Downloads (Last 12 months) 0
  • Downloads (Last 6 weeks) 0

View options

Login options.

Check if you have access through your login credentials or your institution to get full access on this article.

Full Access

Share this publication link.

Copying failed.

Share on social media

Affiliations, export citations.

  • Please download or close your previous search result export first before starting a new bulk export. Preview is not available. By clicking download, a status dialog will open to start the export process. The process may take a few minutes but once it finishes a file will be downloadable from your browser. You may continue to browse the DL while the export process is in progress. Download
  • Download citation
  • Copy citation

We are preparing your search results for download ...

We will inform you here when the file is ready.

Your file of search results citations is now ready.

Your search export query has expired. Please try again.

How online exposure to nature affects customer engagement: Evidence from Sina Weibo

  • Research Paper
  • Published: 07 September 2024
  • Volume 34 , article number  44 , ( 2024 )

Cite this article

research paper on sentiment analysis of twitter data

  • Jiaqi Wang 1 ,
  • Peng Zou 1 &

The increasing popularity of online information and communication technology (ICT) devices has shifted customers’ contact with nature from offline to online. Online exposure to nature on social media involves information such as bloggers’ social influence, blog image clarity, blog text sentiment, blog length, and online interactions with people, which are inaccessible from offline. This study examines the relationship between online exposure to nature and social media engagement behaviors from the perspective of environmental psychology. We find a significant U-shaped correlation between online exposure to nature and customer engagement on social media. Moreover, this relationship is weakened by social influence and image clarity. Our analysis indicates that online exposure to nature significantly differs from exposure to nature, both theoretically and in terms of results. Our paper enriches the literature on visual content and enhances the understanding of customer engagement on social media. The results also reveal the implementation of social media marketing strategies with images.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save.

  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime

Price includes VAT (Russian Federation)

Instant access to the full article PDF.

Rent this article via DeepDyve

Institutional subscriptions

research paper on sentiment analysis of twitter data

Explore related subjects

  • Artificial Intelligence

Data Availability

The authors will supply the relevant data in response to reasonable requests.

Alexander, M. J., Jaakkola, E., & Hollebeek, L. D. (2018). Zooming out: Actor engagement beyond the dyadic. Journal of Service Management, 29 (3), 333–351. https://doi.org/10.1108/JOSM-08-2016-0237

Article   Google Scholar  

Barger, V., Peltier, J. W., & Schultz, D. E. (2016). Social media and consumer engagement: A review and research agenda. Journal of Research in Interactive Marketing, 10 (4), 268–287. https://doi.org/10.1108/JRIM-06-2016-0065

Barnett, M. L., & Salomon, R. M. (2006). Beyond dichotomy: The curvilinear relationship between social responsibility and financial performance. Strategic Management Journal, 27 (11), 1101–1122. https://doi.org/10.1002/smj.557

Barragan-Jason, G., Loreau, M., De Mazancourt, C., Singer, M. C., & Parmesan, C. (2023). Psychological and physical connections with nature improve both human well-being and nature conservation: A systematic review of meta-analyses. Biological Conservation, 277 , 109842. https://doi.org/10.1016/j.biocon.2022.109842

Behnam, M., Hollebeek, L. D., Clark, M. K., & Farabi, R. (2021). Exploring customer engagement in the product vs. service context. Journal of Retailing and Consumer Services, 60 , 102456. https://doi.org/10.1016/j.jretconser.2021.102456

Beil, K., & Hanes, D. (2013). The influence of urban natural and built environments on physiological and psychological measures of stress— A pilot study. International Journal of Environmental Research and Public Health, 10 (4), 1250–1267. https://doi.org/10.3390/ijerph10041250

Bell, S. L., Foley, R., Houghton, F., Maddrell, A., & Williams, A. M. (2018). From therapeutic landscapes to healthy spaces, places and practices: A scoping review. Social Science & Medicine, 196 , 123–130. https://doi.org/10.1016/j.socscimed.2017.11.035

Berto, R. (2014). The role of nature in coping with psycho-physiological stress: A literature review on restorativeness. Behavioral Sciences, 4 (4), 394–409. https://doi.org/10.3390/bs4040394

Bhattacharjee, A., & Mogilner, C. (2014). Happiness from ordinary and extraordinary experiences. Journal of Consumer Research, 41 (1), 1–17. https://doi.org/10.1086/674724

Blasco-Arcas, L., Alexander, M., Sörhammar, D., Jonas, J. M., Raithel, S., & Chen, T. (2020). Organizing actor engagement: A platform perspective. Journal of Business Research, 118 , 74–85. https://doi.org/10.1016/j.jbusres.2020.06.050

Boujena, O., Ulrich, I., Manthiou, A., & Godey, B. (2021). Customer engagement and performance in social media: A managerial perspective. Electronic Markets, 31 (4), 965–987. https://doi.org/10.1007/s12525-020-00450-3

Bowler, D. E., Buyung-Ali, L. M., Knight, T. M., & Pullin, A. S. (2010). A systematic review of evidence for the added benefits to health of exposure to natural environments. BMC Public Health, 10 (1), 456. https://doi.org/10.1186/1471-2458-10-456

Bratman, G. N., Hamilton, J. P., & Daily, G. C. (2012). The impacts of nature experience on human cognitive function and mental health. Annals of the New York Academy of Sciences, 1249 (1), 118–136. https://doi.org/10.1111/j.1749-6632.2011.06400.x

Breiman, L. (2001). Random forests. Machine Learning, 45 (1), 5–32. https://doi.org/10.1023/A:1010933404324

Broadbent, D. E. (1958). Perception and communication . Pergamon Press.

Book   Google Scholar  

Brodie, R. J., Ilic, A., Juric, B., & Hollebeek, L. (2013). Consumer engagement in a virtual brand community: An exploratory analysis. Journal of Business Research, 66 (1), 105–114. https://doi.org/10.1016/j.jbusres.2011.07.029

Buechel, E. C., & Berger, J. (2018). Microblogging and the value of undirected communication. Journal of Consumer Psychology, 28 (1), 40–55. https://doi.org/10.1002/jcpy.1013

Busalim, A. H., Ghabban, F., & Hussin, A. R. C. (2021). Customer engagement behaviour on social commerce platforms: An empirical study. Technology in Society, 64 , 101437. https://doi.org/10.1016/j.techsoc.2020.101437

Chai, T., & Draxler, R. R. (2014). Root mean square error (rmse) or mean absolute error (mae). Geoscientific Model Development Discussions, 7 (1), 1525–1534. https://doi.org/10.5194/gmdd-7-1525-2014

Chicco, D., Warrens, M. J., & Jurman, G. (2021). The coefficient of determination r-squared is more informative than smape, mae, mape, mse and rmse in regression analysis evaluation. Peerj Computer Science, 7 , 623–647. https://doi.org/10.7717/peerj-cs.623

Choi, Y. K., Seo, Y., & Yoon, S. (2017). E-WOM messaging on social media: Social ties, temporal distance, and message concreteness. Internet Research, 27 (3), 495–505. https://doi.org/10.1108/IntR-07-2016-0198

Cohen, J., Patricia, C., West, S. G., & Leona, S. A. (2003). Applied multiple regression/correlation analysis for the behavioral sciences . Lawrence Erlbaum Associates. https://doi.org/10.4324/9780203774441

Cova, B., Carù, A., & Cayla, J. (2018). Re-conceptualizing escape in consumer research. Qualitative Market Research: An International Journal, 21 (4), 445–464. https://doi.org/10.1108/QMR-01-2017-0030

Criscuolo, P., Dahlander, L., Grohsjean, T., & Salter, A. (2017). Evaluating novelty: The role of panels in the selection of R&D projects. Academy of Management Journal, 60 (2), 433–460. https://doi.org/10.5465/amj.2014.0861

De Vries, L., Gensler, S., & Leeflang, P. S. H. (2012). Popularity of brand posts on brand fan pages: An investigation of the effects of social media marketing. Journal of Interactive Marketing, 26 (2), 83–91. https://doi.org/10.1016/j.intmar.2012.01.003

Diaz, J., Poblete, B., & Bravo-Marquez, F. (2020). An integrated model for textual social media data with spatio-temporal dimensions. Information Processing & Management, 57 (5), 102219. https://doi.org/10.1016/j.ipm.2020.102219

Edmunds, A., & Morris, A. (2000). The problem of information overload in business organisations: A review of the literature. International Journal of Information Management, 20 (1), 17–28. https://doi.org/10.1016/S0268-4012(99)00051-1

Enns, J. T., & MacDonald, S. C. (2013). The role of clarity and blur in guiding visual attention in photographs. Journal of Experimental Psychology: Human Perception and Performance, 39 (2), 568. https://doi.org/10.1037/a0029877

Eppler, M. J., & Mengis, J. (2004). The concept of information overload-a review of literature from organization science, accounting, marketing, mis, and related disciplines. The Information Society: An International Journal, 20 (5), 1–20. https://doi.org/10.1007/978-3-8349-9772-2_15

Giglio, S., Pantano, E., Bilotta, E., & Melewar, T. C. (2020). Branding luxury hotels: Evidence from the analysis of consumers’ “big” visual data on TripAdvisor. Journal of Business Research, 119 , 495–501. https://doi.org/10.1016/j.jbusres.2019.10.053

Golden, A. R. (1990). The effect of quality and clarity on the recall of photographic illustrations. British Journal of Educational Technology, 21 (1), 21–30. https://doi.org/10.1111/j.1467-8535.1990.tb00666.x

Haans, R. F., Pieters, C., & He, Z. (2016). Thinking about U: Theorizing and testing U- and inverted U-shaped relationships in strategy research. Strategic Management Journal, 37 (7), 1177–1195. https://doi.org/10.1002/smj.2399

Hansen, M. M., Jones, R., & Tocchini, K. (2017). Shinrin-yoku (Forest bathing) and nature therapy: A state-of-the-art review. International Journal of Environmental Research and Public Health, 14 (8), 851. https://doi.org/10.3390/ijerph14080851

Hartig, T., Evans, G. W., Jamner, L. D., Davis, D. S., & Gärling, T. (2003). Tracking restoration in natural and urban field settings. Journal of Environmental Psychology, 23 (2), 109–123. https://doi.org/10.1016/S0272-4944(02)00109-3

Hartig, T., Mitchell, R., De Vries, S., & Frumkin, H. (2014). Nature and health. Annual Review of Public Health, 35 (1), 207–228. https://doi.org/10.1146/annurev-publhealth-032013-182443

Hayes, M., & Patterson, D. G. (1921). Experimental development of the graphic rating method. Psychological Bulletin, 18 (2), 98–99.  https://doi.org/10.1037/h0064147

Google Scholar  

Held, R. T., Cooper, E. A., O’Brien, J. F., & Banks, M. S. (2010). Using blur to affect perceived distance and size. ACM transactions on graphics. ACM Transactions on Graphics, 29 (2), 1–16. https://doi.org/10.1145/1731047.1731057

Herbig, P. A., & Kramer, H. (1994). The effect of information overload on the innovation choice process: Innovation overload. Journal of Consumer Marketing, 11 (2), 45–54. https://doi.org/10.1108/07363769410058920

Howard, J., & Bowles, M. (2012, February). The two most important algorithms in predictive modeling today. In  Strata Conference Presentation , Vol 28.

Hussain, Z., & Griffiths, M. D. (2009). The attitudes, feelings, and experiences of online gamers: A qualitative analysis. CyberPsychology & Behavior, 12 (6), 747–753. https://doi.org/10.1089/cpb.2009.0059

Jaakkola, E., & Aarikka-Stenroos, L. (2019). Customer referencing as business actor engagement behavior – Creating value in and beyond triadic settings. Industrial Marketing Management, 80 , 27–42. https://doi.org/10.1016/j.indmarman.2018.06.014

Jiang, S. (2022). The roles of worry, social media information overload, and social media fatigue in hindering health fact-checking. Social Media + Society, 8 (3), 1–12. https://doi.org/10.1177/20563051221113070

Jin, S. A. A., & Phua, J. (2014). Following celebrities’ tweets about brands: The impact of Twitter-based electronic word-of-mouth on consumers’ source credibility perception, buying intention, and social identification with celebrities. Journal of Advertising, 43 (2), 181–195. https://doi.org/10.1080/00913367.2013.827606

Kaplan, R., & Kaplan, S. (1989). The experience of nature: A psychological perspective . Cambridge University Press.

Katona, Z., Zubcsek, P. P., & Sarvary, M. (2011). Network effects and personal influences: The diffusion of an online social network. Journal of Marketing Research, 48 (3), 425–443. https://doi.org/10.1509/jmkr.48.3.425

Keinan, A., & Kivetz, R. (2011). Productivity orientation and the consumption of collectable experiences. Journal of Consumer Research, 37 (6), 935–950. https://doi.org/10.1086/657163

Kotera, Y., Richardson, M., & Sheffield, D. (2022). Effects of Shinrin-yoku (Forest bathing) and nature therapy on mental health: A systematic review and meta-analysis. International Journal of Mental Health and Addiction, 20 (1), 337–361. https://doi.org/10.1007/s11469-020-00363-4

Li, D., & Han, X. (2021). Assessing the influence of goal pursuit and emotional attachment on customer engagement behaviors. Journal of Retailing and Consumer Services, 59 , 102355. https://doi.org/10.1016/j.jretconser.2020.102355

Li, Y., & Xie, Y. (2020). Is a picture worth a thousand words? An empirical study of image content and social media engagement. Journal of Marketing Research, 57 (1), 1–19. https://doi.org/10.1177/0022243719881113

Li, H., Browning, M. H. E. M., Rigolon, A., Larson, L. R., Taff, D., Labib, S. M., Benfield, J., Yuan, S., McAnirlin, O., Hatami, N., & Kahn, P. H. (2023). Beyond “bluespace” and “greenspace”: A narrative review of possible health benefits from exposure to other natural landscapes. Science of the Total Environment, 856 , 159292. https://doi.org/10.1016/j.scitotenv.2022.159292

Liu, Z., Liu, L., & Li, H. (2012). Determinants of information retweeting in microblogging. Internet Research, 22 (4), 443–466. https://doi.org/10.1108/10662241211250980

Liu, L., Zhang, B., & Li, X. (2019a). An experimental study on the effects of social media and user’s anxiety. Journal of Information Resources Management, 9 (2), 66–76. https://doi.org/10.13365/j.jirm.2019.02.066

Liu, X., Deng, Z., & Yang, Y. (2019b). Recent progress in semantic image segmentation. Artificial Intelligence Review, 52 (2), 1089–1106. https://doi.org/10.1007/s10462-018-9641-3

Lu, Z. Y., Jung, S., & Peck, J. (2023). It looks like “theirs”: When and why human presence in the photo lowers viewers’ liking and preference for an experience venue. Journal of Consumer Research , ucad059. https://doi.org/10.1093/jcr/ucad059

Ma, L., Sun, B., & Kekre, S. (2015). The squeaky wheel gets the grease—An empirical analysis of customer voice and firm intervention on Twitter. Marketing Science, 34 (5), 627–645. https://doi.org/10.1287/mksc.2015.0912

Ma, J. W., Yang, Y., & Wilson, J. A. J. (2017). A window to the ideal self: A study of UK Twitter and Chinese Sina Weibo selfie-takers and the implications for marketers. Journal of Business Research, 74 , 139–142. https://doi.org/10.1016/j.jbusres.2016.10.025

Mandryk, R. L., Frommel, J., Armstrong, A., & Johnson, D. (2020). How passion for playing world of warcraft predicts in-game social capital, loneliness, and wellbeing. Frontiers in Psychology, 11 , 2165. https://doi.org/10.3389/fpsyg.2020.02165

Mather, G., & Smith, D. R. (2010). Blur discrimination and its relation to blur-mediated depth perception. Perception, 31 (10), 1211–1219. https://doi.org/10.1068/p3254

Matsuoka, R. H. (2010). Student performance and high school landscapes: Examining the links. Landscape and Urban Planning, 97 (4), 273–282. https://doi.org/10.1016/j.landurbplan.2010.06.011

Mehrabian, A., & Russell, J. A. (1974). An approach to environmental psychology . MIT Press.

Miller, J. G. (1978). Living systems . McGraw-Hill.

Molina, A., Fernández, A. C., Gómez, M., & Aranda, E. (2017). Differences in the city branding of European capitals based on online vs. offline sources of information. Tourism Management, 58 , 28–39. https://doi.org/10.1016/j.tourman.2016.10.005

Nanne, A. J., Antheunis, M. L., Van der Lee, C. G., Postma, E. O., Wubben, S., & Van Noort, G. (2020). The use of computer vision to analyze brand-related user generated image content. Journal of Interactive Marketing, 50 (1), 156–167. https://doi.org/10.1016/j.intmar.2019.09.003

Naylor, R. W., Lamberton, C. P., & West, P. M. (2012). Beyond the “like” button: The impact of mere virtual presence on brand evaluations and purchase intentions in social media settings. Journal of Marketing, 76 (6), 105–120. https://doi.org/10.1509/jm.11.0105

Park, B. J., Tsunetsugu, Y., Kasetani, T., Kagawa, T., & Miyazaki, Y. (2010). The physiological effects of Shinrin-yoku (taking in the forest atmosphere or forest bathing): Evidence from field experiments in 24 forests across Japan. Environmental Health and Preventive Medicine, 15 (1), 18–26. https://doi.org/10.1007/s12199-009-0086-9

Pavlov, I. (1927). Conditioned reflexes: An investigation of the physiological activity of the cerebral cortex (G. V. Anrep, Trans.). Oxford University Press.

Pinho, J. C. M. R., & Soares, A. M. (2011). Examining the technology acceptance model in the adoption of social networks. Journal of Research in Interactive Marketing, 5 (2/3), 116–129. https://doi.org/10.1108/17505931111187767

Pretty, J., Peacock, J., Sellens, M., & Griffin, M. (2005). The mental and physical health outcomes of green exercise. International Journal of Environmental Health Research, 15 (5), 319–337. https://doi.org/10.1080/09603120500155963

Qiu, M., Sha, J., & Scott, N. (2021). Restoration of visitors through nature-based tourism: A systematic review, conceptual framework, and future research directions. International Journal of Environmental Research and Public Health, 18 (5), 2299. https://doi.org/10.3390/ijerph18052299

Quijada, M. D. R. B., Arriaga, J. L. D. O., & Domingo, D. A. (2021). Insights into user engagement on social media. Findings from two fashion retailers. Electronic Markets, 31 (1), 125–137. https://doi.org/10.1007/s12525-020-00429-0

Rietveld, R., Van Dolen, W., Mazloom, M., & Worring, M. (2020). What you feel, is what you like influence of message appeals on customer engagement on Instagram. Journal of Interactive Marketing, 49 (1), 20–53. https://doi.org/10.1016/j.intmar.2019.06.003

Rose, G., & Willis, A. (2019). Seeing the smart city on Twitter: Colour and the affective territories of becoming smart. Environment and Planning d: Society and Space, 37 (3), 411–427. https://doi.org/10.1177/0263775818771080

Schick, A. G., Gordon, L. A., & Haka, S. (1990). Information overload: A temporal approach. Accounting, Organizations and Society, 15 (3), 199–220. https://doi.org/10.1016/0361-3682(90)90005-F

Schneider, S. C. (1987). Information overload: Causes and consequences. Human Systems Management, 7 (2), 143–153. https://doi.org/10.3233/HSM-1987-7207

Shao, G. (2009). Understanding the appeal of user-generated media: A uses and gratification perspective. Internet Research, 19 (1), 7–25. https://doi.org/10.1108/10662240910927795

Shi, J., Hu, P., Lai, K. K., & Chen, G. (2018). Determinants of users’ information dissemination behavior on social networking sites. Internet Research, 28 (2), 393–418. https://doi.org/10.1108/IntR-01-2017-0038

Sparrow, P. (1999). Strategy and cognition: Understanding the role of management knowledge structures, organizational memory and information overload. Creativity and Innovation Management, 8 (2), 140–148. https://doi.org/10.1111/1467-8691.00128

Srivastava, V., & Kalro, A. D. (2019). Enhancing the helpfulness of online consumer reviews: The role of latent (content) factors. Journal of Interactive Marketing, 48 (1), 33–50. https://doi.org/10.1016/j.intmar.2018.12.003

Tennessen, C. M., & Cimprich, B. (1995). Views to nature: Effects on attention. Journal of Environmental Psychology, 15 (1), 77–85. https://doi.org/10.1016/0272-4944(95)90016-0

Ulrich, R. S. (1984). View through a window may influence recovery from surgery. Science, 224 (4647), 420–421. https://doi.org/10.1126/science.6143402

Ulrich, R. S. (1983). Aesthetic and affective response to natural environment. Behavior and the natural environment . Springer US.

UNWTO. (2023). Tourism on track for full recovery as new data shows strong start to 2023 . https://www.unwto.org/news/tourism-on-track-for-full-recovery-as-new-data-shows-strong-start-to-2023 . Accessed 3 June 2023.

Van den Berg, A. E., & Beute, F. (2021). Walk it off! The effectiveness of walk and talk coaching in nature for individuals with burnout- and stress-related complaints. Journal of Environmental Psychology, 76 , 101641. https://doi.org/10.1016/j.jenvp.2021.101641

Van den Berg, A. E., Jorgensen, A., & Wilson, E. R. (2014). Evaluating restoration in urban green spaces: Does setting type make a difference? Landscape and Urban Planning, 127 , 173–181. https://doi.org/10.1016/j.landurbplan.2014.04.012

Vargo, S. L., & Lusch, R. F. (2004). Evolving to a new dominant logic for marketing. Journal of Marketing, 68 (1), 1–17. https://doi.org/10.1509/jmkg.68.1.1.24036

Wang, X., & Liu, Z. (2019). Online engagement in social media: A cross-cultural comparison. Computers in Human Behavior, 97 , 137–150. https://doi.org/10.1016/j.chb.2019.03.014

Wang, Y., Wang, J., Wang, H., Zhang, R., & Li, M. (2021). Users’ mobility enhances information diffusion in online social networks. Information Sciences, 546 , 329–348. https://doi.org/10.1016/j.ins.2020.07.061

Weibo Corporation. (2023). Weibo reports third quarter 2023 unaudited financial results . Beijing. http://ir.weibo.com/node/9076/pdf . Accessed 29 August 2023.

Wies, S., Bleier, A., & Edeling, A. (2023). Finding goldilocks influencers: How follower count drives social media engagement. Journal of Marketing, 87 (3), 383–405. https://doi.org/10.1177/00222429221125131

Wilson, E. O. (1984). Biophilia . Harvard University Press.

Yang, M., Ren, Y., & Adomavicius, G. (2019). Understanding user-generated content and customer engagement on Facebook business pages. Information Systems Research, 30 (3), 839–855. https://doi.org/10.1287/isre.2019.0834

Yim, D., Malefyt, T., & Khuntia, J. (2021). Is a picture worth a thousand views? Measuring the effects of travel photos on user engagement using deep learning algorithms. Electronic Markets, 31 (3), 619–637. https://doi.org/10.1007/s12525-021-00472-5

Yu, C. E., Xie, S. Y., & Wen, J. (2020). Coloring the destination: The role of color psychology on Instagram. Tourism Management, 80 , 104110. https://doi.org/10.1016/j.tourman.2020.104110

Zauberman, G., Ratner, R. K., & Kim, B. K. (2009). Memories as assets: Strategic memory protection in choice over time. Journal of Consumer Research, 35 (5), 715–728. https://doi.org/10.1086/592943

Zhang, Y., Wang, Z., Xiao, L., Wang, L., & Huang, P. (2023). Discovering the evolution of online reviews: A bibliometric review. Electronic Markets, 33 , 49. https://doi.org/10.1007/s12525-023-00667-y

Zhao, L., Zhang, M., Ming, Y., Niu, T., & Wang, Y. (2023). The effect of image richness on customer engagement: Evidence from Sina Weibo. Journal of Business Research, 154 , 113307. https://doi.org/10.1016/j.jbusres.2022.113307

Zhou, S., Qiao, Z., Du, Q., Alan, W., Weiguo, F., & Xiangbin, Y. (2018). Measuring customer agility from online reviews using big data text analytics. Journal of Management Information Systems, 35 (2), 510–539. https://doi.org/10.1080/07421222.2018.1451956

Zhu, M., Song, Y., Gao, S., & Wang, H. (2020). Similar picture recommendation system based on deep hashing: Evidence from the Airbnb platform. Journal of Management Science, 33 (5), 17–28. https://doi.org/10.3969/j.issn.1672-0334.2020.05.002

Download references

Acknowledgements

This research is partially funded by a research grant from the National Natural Science Foundation of China (CN) under project No. 71972060, and the Ministry of Education of Humanities and Social Science project: A study on the purchase behavior of digital products with metaphorical connotation in virtual image construction.

Author information

Authors and affiliations.

Harbin Institute of Technology, 92 Xida Street, Harbin, 150001, Heilongjiang, China

Jiaqi Wang, Peng Zou & Bo Yu

You can also search for this author in PubMed   Google Scholar

Corresponding author

Correspondence to Peng Zou .

Ethics declarations

Competing interests.

All authors declare that we have no significant competing financial, professional, or personal interests that might have influenced the performance or presentation of the work described in this manuscript.

Additional information

Responsible Editor: Marianna Sigala

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Below is the link to the electronic supplementary material.

Supplementary file1 (DOCX 2766 KB)

Rights and permissions.

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Wang, J., Zou, P. & Yu, B. How online exposure to nature affects customer engagement: Evidence from Sina Weibo. Electron Markets 34 , 44 (2024). https://doi.org/10.1007/s12525-024-00728-w

Download citation

Received : 09 January 2024

Accepted : 09 August 2024

Published : 07 September 2024

DOI : https://doi.org/10.1007/s12525-024-00728-w

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

  • Online exposure to nature
  • Social media engagement
  • Environmental psychology
  • Attention restoration theory
  • Stress reduction theory

JEL Classification

  • Find a journal
  • Publish with us
  • Track your research

IMAGES

  1. (PDF) Sentiment Analysis of Twitter Data: A Survey of Techniques

    research paper on sentiment analysis of twitter data

  2. (PDF) Sentiment Analysis of Twitter Data Using Machine Learning

    research paper on sentiment analysis of twitter data

  3. (PDF) Real Time Twitter Sentiment Analysis using Natural Language

    research paper on sentiment analysis of twitter data

  4. Sentiment Analysis of Twitter data, Part 2

    research paper on sentiment analysis of twitter data

  5. Twitter Sentiment Analysis

    research paper on sentiment analysis of twitter data

  6. Case Study for Twitter Sentiment Analysis Tool Using Python NLTK

    research paper on sentiment analysis of twitter data

VIDEO

  1. Twitter Sentiment Analysis| NLP In Python #5|

  2. TESTING MODEL UNTUK SENTIMENT ANALYSIS TWITTER

  3. "Twitter Sentiment Analysis Using Python" "subscribe "

  4. Social media monitoring in Excel [Twitter]

  5. KLASIFIKASI CITRA

  6. Module 7: Twitter Sentiment Analysis-II

COMMENTS

  1. (PDF) Sentiment Analysis of Twitter Data

    Sentiment Analysis of Twitter Data. November 2022; Applied Sciences 12(22):11775 ... Research into Twitter Sentiment Analysis (TSA) is an active subfield of text mining. ... papers, which allows ...

  2. Sentiment analysis using Twitter data: a comparative application of

    Sentiment analysis using Twitter data: a comparative application of lexicon- and machine-learning-based approach ... we selected several critical time points for research and analysis in stages according to the plan of lifting the lockdown in England, and the duration of each stage is about two months. ... this paper extracts data regarding ...

  3. Free Full-Text

    Twitter has become a major social media platform and has attracted considerable interest among researchers in sentiment analysis. Research into Twitter Sentiment Analysis (TSA) is an active subfield of text mining. TSA refers to the use of computers to process the subjective nature of Twitter data, including its opinions and sentiments. In this research, a thorough review of the most recent ...

  4. Sentiment Analysis of Twitter Data: A Survey of Techniq

    In this paper, we provide a survey and a ... and Support Vector Machine, we provide research on twitter data streams.We have also discussed general challenges and applications of Sentiment Analysis on Twitter. opinions in text into ... Go and L.Huang (2009) [3] proposed a solution for sentiment analysis for twitter data by using distant ...

  5. A systematic review of social media-based sentiment analysis: Emerging

    2.1. The identification of research questions. Sentiment analysis techniques have been shown to enable individuals, organizations and governments to benefit from the wealth of meaningful information contained in the unstructured data of social media, and there has been a great deal of research devoted to the design of high-performance sentiment classifiers and their applications [1], [4], [5 ...

  6. [PDF] Sentiment Analysis of Twitter Data

    This research paper proposes a method for twitter sentiment analysis by leveraging the power of a transformer-based model called RoBERTa, which showcases an exceptional accuracy of 96.78%, highlighting its effectiveness in understanding and classifying sentiment within the context of tweets. Expand

  7. Sentiment Analysis of Twitter Data: A Survey of Techniques

    View a PDF of the paper titled Sentiment Analysis of Twitter Data: A Survey of Techniques, by Vishal.A.Kharde and 1 other authors. With the advancement of web technology and its growth, there is a huge volume of data present in the web for internet users and a lot of data is generated too. Internet has become a platform for online learning ...

  8. A survey of Twitter research: Data model, graph structure, sentiment

    A survey of Twitter research: Data model, graph structure, ... (2011) the author derived accurate predictions of the citations of a scientific paper, ... The first work on sentiment analysis in Twitter was performed by Go et al. (2009). This work used emoticons as sentiment indicators for labeling, used a train set of 1.6 million tweets and a ...

  9. PDF Sentiment Analysis of Twitter Data

    Research into Twitter Sentiment Analysis (TSA) is an active subfield of text mining. TSA refers to the use of computers to process the subjective nature of Twitter data, including its opinions and ...

  10. Sentiment analysis of twitter data

    and research fields have been discussed [10]. There are also some works have been done on Facebook [19-23] sentimental analysis however in this paper we mostly focus on the Twitter sentimental analysis. For a larger texts one solution could be understand the text, summarize it and give weight to

  11. A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research

    The results showed that the Bi-LSTM model achieved an accuracy of 81.20% on the Twitter US Airline Sentiment dataset, demonstrating its effectiveness for sentiment analysis on Twitter data. Vimali and Murugan (2021) [ 39 ] proposed a Bi-LSTM model for analyzing the sentiment of Amazon e-commerce reviews.

  12. Twitter as a predictive system: A systematic literature review

    In answer to RQ1, Table 3 shows an increasing interest in researching the potential of Twitter as a predictive system, with the highest research activity in 2020 and 2021, according to the number of publications. The evolution of artificial intelligence (AI) and machine learning, as represented in the case of Sentiment analysis as an NLP technique applied to the massive volume of texts ...

  13. Sentiment Analysis of Twitter Data Using Machine Learning

    The findings from this research demonstrate the effectiveness of the Twitter Sentiment Analysis system, in capturing and classifying sentiments expressed in tweets. Consequently, this research emphasizes the significance and potential of Twitter Sentiment Analysis, as an approach to examining prevailing sentiment.

  14. (PDF) Twitter sentiment analysis

    A Research Paper on Social media: An Innovative Educational Tool ... Sentiment Analysis on Twitter Data is to analyze sentiment from Twit ter generated text data which will be able to show the ...

  15. PDF Sentiment Analysis of Twitter Data

    We examine sentiment analysis on Twitter data. The contributions of this paper are: (1) We introduce POS-specific prior polarity fea- ... and give future directions of research in section 9. 2 Literature Survey ... of the early and recent results on sentiment analysis of Twitter data are by Go et al. (2009), (Bermingham and Smeaton, 2010) and ...

  16. Twitter sentiment analysis using hybrid gated attention recurrent

    Sentiment analysis is the most trending and ongoing research in the field of data mining. Nowadays, several social media platforms are developed, among that twitter is a significant tool for sharing and acquiring peoples' opinions, emotions, views, and attitudes towards particular entities. This made sentiment analysis a fascinating process in the natural language processing (NLP) domain ...

  17. Comparative Analysis of Deep Learning Approaches for Aspect-Based

    Social networking-based platforms (e.g., Twitter, Facebook, Amazon) where users feel free to express their opinion/sentiment about any product, service or event, in the form of reviews, tweets, blogs, etc., in the last decade with the enhanced use of social media and social networking, result in huge amount of data in unstructured and unorganized form, and the need of sentiment analysis of ...

  18. [PDF] Sentiment Analysis of Twitter Data

    DOI: 10.48175/ijarsct-18524 Corpus ID: 55349082; Sentiment Analysis of Twitter Data @article{Shanmuk2024SentimentAO, title={Sentiment Analysis of Twitter Data}, author={Pattapu Shanmuk and Pothireddy Tarun and Kulkarni Preethi and Patnala and Ravi Kiran and Chungada and Divya Lalitha and Bai and Mr and Sudhanshu Prakash and Tiwari}, journal={International Journal of Advanced Research in ...

  19. Sentiment Analysis of Twitter Data

    The aim of this paper is to present a model that can perform sentiment analysis of real data collected from Twitter. Data in Twitter is highly unstructured which makes it difficult to analyze. However, our proposed model is different from prior work in this field because it combined the use of supervised and unsupervised machine learning ...

  20. Emotion and sentiment analysis from Twitter text

    Twitter [4] data is a popular choice for text analysis tasks because of the limited number of characters (140) allowed and the global use of Twitter to express opinions on different issues among people of all ages, races, cultures, genders, etc. In this paper, we analyzed a Twitter network for emotion and sentiment detection and analysis.

  21. PDF Sentiment Analysis of Twitter Data :A Survey of Techniques

    field of sentiment analysis of twitter Thisdata. survey focuses mainly on sentiment analysis of twitter data which is helpful to analyze the information in the tweets where opinions are highly unstructured, heterogeneous and are either positive or negative, or neutral in some cases. In this paper, we provide a

  22. Prediction of infectious diseases using sentiment analysis on social

    As the influence and risk of infectious diseases increase, efforts are being made to predict the number of confirmed infectious disease patients, but research involving the qualitative opinions of social media users is scarce. However, social data can change the psychology and behaviors of crowds through information dissemination, which can affect the spread of infectious diseases.

  23. (PDF) Sentiment Analysis of Twitter Data

    We examine sentiment analysis on Twitter data. The contributions of this paper are: (1) We introduce POS-specific prior polarity fea- tures. (2) We explore the use of a tree kernel to obviate the ...

  24. Occupational groups prediction in Turkish Twitter data by using machine

    G.M. Raza, Z.S. Butt, S. Latif, A. Wahid, Sentiment analysis on COVID tweets: An experimental analysis on the impact of count vectorizer and TF-IDF on sentiment predictions using deep learning models, Paper presented at the International Conference on Digital Futures and Transformative Technologies (ICoDT2), 2021.

  25. Sentimental Analysis of Twitter Data with respect to General Elections

    In this paper, Tweets were collected from the period of Jan 2019 to March 2019. Using that tweets, sentiment analysis was performed to gain the opinion polarity of the folks concerning general elections held in India. Two candidates were considered for this study: Candidate-1 and Candidate-2.

  26. How online exposure to nature affects customer engagement: Evidence

    The increasing popularity of online information and communication technology (ICT) devices has shifted customers' contact with nature from offline to online. Online exposure to nature on social media involves information such as bloggers' social influence, blog image clarity, blog text sentiment, blog length, and online interactions with people, which are inaccessible from offline. This ...

  27. Sentiment Analysis with NLP on Twitter Data

    2019. Sentiment Analysis with NLP on T witter Data. Md. Rakibul Hasan 1, Maisha Maliha 2, M. Arifuzzaman 3. 1 −2Department of Electronics and Communications Engineering, East West University ...