Abstract
Social media platforms such as Twitter serve as a powerful tool for real-time information dissemination and worldwide communication, shaping public opinions and providing a platform for diverse voices to be heard. The current study proposes methods to identify trending hashtags on Twitter over a six-month period (June to October 2021) and analyze the sentiment dynamics linked to these hashtags. In order to carry out trend analysis three classification algorithms—Naive Bayes, Gradient Boosting Decision Tree, and Random Forest—were evaluated. The results indicate that the Random Forest model outperformed the other two algorithms in accurately identifying trending hashtags. In addition to this, a comprehensive sentiment analysis was conducted using both rule-based and lexicon-based approaches. The VADER sentiment analysis was utilized as the foundation for the Support Vector Machine classifier which achieved an accuracy of 91.84%, while the TextBlob library provided additional sentiment insights. The majority of research results, leaned towards neutrality, indicating challenges in capturing sentiment complexities present in Twitter conversations. The findings highlight the effectiveness of machine learning approaches, while also recognizing the potential for deep learning techniques to enhance sentiment analysis in future research.





Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Data Availability
No extra data needs to be declared, already available data has been used.
References
Li C, Sun A, Datta A (2012) Twevent: segment-based event detection from tweets. In: Proceedings of the 21st ACM international conference on information and knowledge management, pp 155–164
Lehmann J, Gonçalves B, Ramasco JJ, Cattuto C (2012) Dynamical classes of collective attention in twitter. In: Proceedings of the 21st international conference on World Wide Web, pp 251–260
Wang X, Wei F, Liu X, Zhou M, Zhang M (2011) Topic sentiment analysis in twitter: a graph-based hashtag sentiment classification approach. In: Proceedings of the 20th ACM international conference on information and knowledge management, pp 1031–1040
Efron M (2010) Hashtag retrieval in a microblogging environment. In: Proceedings of the 33rd international ACM SIGIR conference on research and development in information retrieval, pp 787–788
Yang L, Sun T, Zhang M, Mei Q (2012) We know what@ you# tag: does the dual role affect hashtag adoption?. In: Proceedings of the 21st international conference on World Wide Web, pp 261–270
Motlagh M, Shahhoseini H, Fatehi N. A reliable sentiment analysis for classification of tweets in social networks. Soc Netw Anal Min. 2022;13(1):7.
Ma Z, Sun A, Cong G. On predicting the popularity of newly emerging hashtags in twitter. J Am Soc Inform Sci Technol. 2013;64(7):1399–410.
Helmy A, Nassar R, Ramdan N. Depression detection for twitter users using sentiment analysis in English and Arabic tweets. Artif Intell Med. 2024;147: 102716.
Khan HU, Nasir S, Nasim K, Shabbir D, Mahmood A. Twitter trends: a ranking algorithm analysis on real time data. Expert Syst Appl. 2021;164: 113990.
Petersen K, Gerken JM. # Covid-19: an exploratory investigation of hashtag usage on Twitter. Health Policy. 2021;125(4):541–7.
Khanday AMUD, Rabani ST, Khan QR, Malik SH. Detecting twitter hate speech in COVID-19 era using machine learning and ensemble learning techniques. Int J Inf Manag Data Insights. 2022;2(2): 100120.
Tripathy A, Agrawal A, Rath SK. Classification of sentimental reviews using machine learning techniques. Procedia Comput Sci. 2015;57:821–9.
Aqlan A, Manjula B, Naik RL (2019) A study of sentiment analysis: concepts, techniques, and challenges
Sahayak V, Shete V, Pathan A. Sentiment analysis on twitter data. Int J Innov Res Adv Eng (IJIRAE). 2015;2(1):178–83.
Kaur C, Sharma A (2020) Twitter sentiment analysis on coronavirus using textblob. In: EasyChair, pp 2516–2314
Sharma R (2021) Twitter: trending Tweets per week (updated weekly) . Kaggle. https://doi.org/10.34740/KAGGLE/DSV/2670667. Accessed 23 Sep 2023
Funding
The authors declare that no funding was received for this research.
Author information
Authors and Affiliations
Contributions
MS and TB prepared the manuscript under the guidance of SS. MS and TB wrote the manuscript and prepared all the images and tables in the text. The manuscript was reviewed by all the authors.
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Research involving human and/or animals
Not applicable.
Informed consent
None required.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
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.
About this article
Cite this article
Bisht, T., Singh, M. & Singhal, S. Determining Twitter Trending Hashtags and Sentiments Associated via Machine Learning Approaches. SN COMPUT. SCI. 5, 1002 (2024). https://doi.org/10.1007/s42979-024-03387-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s42979-024-03387-y