Research Article

Sentiment Analysis Applied on Tweets

Chen Yuan1,*, Xianglong Wang2, Xingda Jiang3, Jiale Wang4, Boxuan Huang5
1. Department of Mathematics, University of Connecticut, Storrs, 06269, United States
2. Management and Business Department, Skidmore College, Saratoga Springs, 12866 United States
3. Faculty of Applied Science and Engineering, University of Toronto, Toronto, M5S 1A1, Canada
4. Arts and Science, University of Toronto, Mississauga, L5L 1C6, Canada
5. Wuhan No.11 Middle School, Wuhan, 430030, China

* Corresponding author: [email protected]

Abstract

As digitization continues to expand nowadays, the accurate capture and comprehension of public sentiment on social media has become vital for various stakeholders such as government, businesses, and researchers. In this paper, we aim to perform sentiment analysis on Tweets and explore effective methods to classify sentiment into joy, sadness, anger, and fear from textual content. We utilized datasets from Kaggle containing textual tweets and employed models such as RNN, LSTM, Transformer, and SVM to compare their performance in sentiment analysis. The findings of this paper may serve as a valuable reference for the selection of models in sentiment analysis, particularly when working with medium-sized datasets. Additionally, they may offer guidance on selecting universally applicable model choices for conducting sentiment analysis across social media platforms.

Keywords: Sentiment Analysis; social media; Kaggle
Published: May 15, 2025
DOI: 10.54254/2753-8818/2025.22733
Volume: TNS Vol.107
pp. 280-292
Download PDF

References

  1. Al-Otaibi, Shaha, et al. "Customer satisfaction measurement using sentiment analysis." International Journal of Advanced Computer Science and Applications 9.2 (2018).
  2. Gang, Zhou, and Liao Chenglin. "Dynamic measurement and evaluation of hotel customer satisfaction through sentiment analysis on online reviews." Journal of Organizational and End User Computing (JOEUC) 33.6 (2021): 1-27.
  3. Sinha, Raj. “Data Analysis and Sentiment Analysis on Amazon Reviews.” International Journal for Research in Applied Science and Engineering Technology, vol. 9, no. 12, 2021, pp. 2200–2206
  4. Qian, Cheng, et al. "Understanding public opinions on social media for financial sentiment analysis using AI-based techniques." Information Processing & Management 59.6 (2022): 103098.
  5. Houlihan, Patrick, and Germán G. Creamer. "Leveraging social media to predict continuation and reversal in asset prices." Computational Economics 57.2 (2021): 433-453.
  6. Dixon, Stacy Jo. “Twitter Global Mdau 2022.” Statista, 11 Nov. 2022, www.statista.com/statistics/970920/monetizable-daily-active-twitter-users-worldwide/.
  7. Naskar, Debashis, et al. "Emotion dynamics of public opinions on Twitter." ACM Transactions on Information Systems (TOIS) 38.2 (2020): 1-24.
  8. Gayo-Avello, Daniel. "A meta-analysis of state-of-the-art electoral prediction from Twitter data." Social Science Computer Review 31.6 (2013): 649-679.
  9. Singh, Sanjam, and Amandeep Kaur. "Twitter sentiment analysis for stock prediction." Available at SSRN 4157658 (2022).
  10. Pagolu, Venkata Sasank, et al. "Sentiment analysis of Twitter data for predicting stock market movements." 2016 International Conference on signal processing, communication, power, and Embedded systems (SCOPES). IEEE, 2016.
  11. Cortes, Corinna and Vladimir Naumovich Vapnik. “Support-Vector Networks.” Machine Learning 20 (1995): 273-297.
  12. Pang, Bo, Lillian Lee, and Shivakumar Vaithyanathan. "Thumbs up? Sentiment classification using machine learning techniques." arXiv preprint cs/0205070 (2002).
  13. Mullen, Tony, and Nigel Collier. "Sentiment analysis using support vector machines with diverse information sources." Proceedings of the 2004 conference on empirical methods in natural language processing. 2004.
  14. Wu, Peng, et al. "Social media opinion summarization using emotion cognition and convolutional neural networks." International Journal of Information Management 51 (2020): 101978.
  15. Mikolov, Tomas, et al. "Recurrent neural network based language model." Interspeech. Vol. 2. No. 3. 2010.
  16. Giles, C. Lee, Steve Lawrence, and Ah Chung Tsoi. "Rule inference for financial prediction using recurrent neural networks." Proceedings of the IEEE/IAFE 1997 Computational Intelligence for Financial Engineering (CIFEr). IEEE, 1997.
  17. Murakami, Kouichi, and Hitomi Taguchi. "Gesture recognition using recurrent neural networks." Proceedings of the SIGCHI conference on Human factors in computing systems. 1991.
  18. Haykin, Simon. Neural networks and learning machines, 3/E. Pearson Education India, 2009.
  19. Kolen, John F., and Stefan C. Kremer, eds. A field guide to dynamical recurrent networks. John Wiley & Sons, 2001.
  20. Medsker, Larry, and Lakhmi C. Jain, eds. Recurrent neural networks: design and applications. CRC Press, 1999.
  21. Bengio, Yoshua, Patrice Simard, and Paolo Frasconi. "Learning long-term dependencies with gradient descent is difficult." IEEE transactions on neural networks 5.2 (1994): 157-166.
  22. Hochreiter, Sepp, and Jürgen Schmidhuber. "Long short-term memory." Neural Computation 9.8 (1997): 1735-1780.
  23. Wang, Yequan, et al. "Attention-based LSTM for aspect-level sentiment classification." Proceedings of the 2016 conference on empirical methods in natural language processing. 2016.
  24. Tai, Kai Sheng, Richard Socher, and Christopher D. Manning. "Improved semantic representations from tree-structured long short-term memory networks." arXiv preprint arXiv:1503.00075 (2015).
  25. Mahadevaswamy, U. B., and P. Swathi. "Sentiment analysis using bidirectional LSTM network." Procedia Computer Science 218 (2023): 45-56.
  26. Islam, Juyana, et al. "Recognition of Emotion from Emoticon with Text in Microblog Using LSTM." Advances in Science, Technology and Engineering Systems Journal 6.3 (2021): 347-354.
  27. Vaswani, Ashish, et al. "Attention is all you need." Advances in neural information processing systems 30 (2017).
  28. Mukherjee, Swapnanil, and Sujit Das. "Application of transformer-based language models to detect hate speech in social media." Journal of Computational and Cognitive Engineering (2022).
  29. Devlin, Jacob, et al. "Bert: Pre-training of deep bidirectional transformers for language understanding." arXiv preprint arXiv:1810.04805 (2018).
  30. Hoang, Mickel, Oskar Alija Bihorac, and Jacobo Rouces. "Aspect-based sentiment analysis using bert." Proceedings of the 22nd Nordic conference on computational linguistics. 2019.
  31. Wang, Jingyang, et al. "NGCU: A new RNN model for time-series data prediction." Big Data Research 27 (2022): 100296.
  32. Zargar, S. "Introduction to sequence learning models: RNN, LSTM, GRU." Department of Mechanical and Aerospace Engineering, North Carolina State University, Raleigh, North Carolina 27606 (2021).
  33. Andrychowicz, Marcin, et al. "Learning to learn by gradient descent by gradient descent." Advances in neural information processing systems 29 (2016).
  34. Ko, Ching-Ru, and Hsien-Tsung Chang. "LSTM-based sentiment analysis for stock price forecast." PeerJ Computer Science 7 (2021): e408.
  35. Kingma, D. P., & Ba, J. (2017, January 30). Adam: A method for stochastic optimization. arXiv.org. https://arxiv.org/abs/1412.6980
  36. Joachims, Thorsten. "Svmlight: Support vector machine." SVM-Light Support Vector Machine http://svmlight.joachims.org/, University of Dortmund 19.4 (1999): 25.
  37. Pradhan, Ashis. "Support vector machine-a survey." International Journal of Emerging Technology and Advanced Engineering 2.8 (2012): 82-85.
  38. Ahmad, Munir, et al. "SVM optimization for sentiment analysis." International Journal of Advanced Computer Science and Applications 9.4 (2018).