Novel Model for the Sentimental Analysis of Twitter Data Using Deep Learning
DOI:
https://doi.org/10.54536/ajicti.v1i1.6699Keywords:
Kaggle, LSTM, Machine Learning, Naive Bayes, Sentiment Analysis, TwitterAbstract
Sentiment Analysis is the scientific technique of studying various tweet data from Twitter, hence specifying them either positive, negative, or a neutral one. Numerous algorithms/techniques exists for sentiment analysis like “KNN”, “Naïve Bayes” and “Random Forest” which are based on machine learning or deep learning. Although, such models are employed with an accuracy much less than that required for a better and novel framework model. Therefore, it is very necessary to develop a light-weight, accurate and robust model with high precision and accuracy. Through this study, we have suggested an efficient and novel framework for sentiment analysis of Twitter data named as Improved LSTM Model. We modified/variated the base network of LSTM employing additional layers for better accuracy. We employed an improved LSTM technique for sentiment analysis in our improved model that categorizes the Twitter data better by classifying it into positive, negative, and neutral sentiments. Moreover, the proposed model is more compact due to its novel architecture than the base network. Furthermore, the performance of the traditional/old machine learning models named Random Forest, KNN, and Naïve Bayes based on Twitter data have been analyzed, however, the performance and results of our proposed DL model are much better than ML algorithms. We employed Kaggle dataset for the training/testing of the proposed model, which contains almost 1 million tweets. To evaluate the efficiency of the improved model, we utilized extensive experimentation which demonstrates that our algorithm beats existing sentiment analysis approaches, with an average accuracy of 90.
Downloads
References
Akgül, E. S., Ertano, C., & Diri, B. (2016). Twitter verileri ile duygu analizi. Pamukkale University Journal of Engineering Sciences, 22(2).
Akhtar, M. S., et al. (2018). No, that never happened!! Investigating rumors on Twitter. IEEE Intelligent Systems, 33(5), 8–15.
Al-Ayyoub, M., Essa, S. B., & Alsmadi, I. (2015). Lexicon-based sentiment analysis of Arabic tweets. International Journal of Social Network Mining, 2(2), 101–114.
Ali, G., et al. (2021). Public perceptions of COVID-19 vaccines: Policy implications from US spatiotemporal sentiment analytics. Healthcare, 9(8).
Alorini, G., Rawat, D. B., & Alorini, D. (2021). LSTM-RNN based sentiment analysis to monitor COVID-19 opinions using social media data. In ICC 2021 — IEEE International Conference on Communications. IEEE.
Alorini, G., Rawat, D. B., & Alorini, D. (2021). LSTM-RNN based sentiment analysis to monitor COVID-19 opinions using social media data. In ICC 2021 — IEEE International Conference on Communications. IEEE.
Alsaeedi, A., & Khan, M. Z. (2019). A study on sentiment analysis techniques of Twitter data. International Journal of Advanced Computer Science and Applications, 10(2), 361–374.
Annett, M., & Kondrak, G. (2008). A comparison of sentiment analysis techniques: Polarizing movie blogs. In Conference of the Canadian Society for Computational Studies of Intelligence. Springer.
Araque, O., et al. (2017). Enhancing deep learning sentiment analysis with ensemble techniques in social applications. Expert Systems with Applications, 77, 236–246.
Basiri, M. E., et al. (2021). ABCDM: An attention-based bidirectional CNN-RNN deep model for sentiment analysis. Future Generation Computer Systems, 115, 279–294.
Bilgin, M., & Şentürk, İ. F. (2017). Sentiment analysis on Twitter data with semi-supervised Doc2Vec. In 2017 International Conference on Computer Science and Engineering (UBMK). IEEE.
Carley, K. M., et al. (2016). Crowdsourcing disaster management: The complex nature of Twitter usage in Padang, Indonesia. Safety Science, 90, 48–61.
Comito, C., Forestiero, A., & Papuzzo, G. (2019). Exploiting social media to enhance clinical decision support. In IEEE/WIC/ACM International Conference on Web Intelligence Companion (pp. 244–249).
da Silva, N. F. F., et al. (2016). Using unsupervised information to improve semi-supervised tweet sentiment classification. Information Sciences, 355, 348–365.
Diamantini, C., et al. (2019). Social information discovery enhanced by sentiment analysis techniques. Future Generation Computer Systems, 95, 816–828.
El Rahman, S. A., AlOtaibi, F. A., & AlShehri, W. A. (2019). Sentiment analysis of Twitter data. In 2019 International Conference on Computer and Information Sciences (ICCIS). IEEE.
Gandhi, U. D., et al. (2021). Sentiment analysis on Twitter data by using convolutional neural network (CNN) and long short-term memory (LSTM). Wireless Personal Communications, 1–10.
Go, A., Bhayani, R., & Huang, L. (2009). Twitter sentiment analysis. Entropy, 17, 252–273.
Goularas, D., & Kamis, S. (2019). Evaluation of deep learning techniques in sentiment analysis from Twitter data. In 2019 International Conference on Deep Learning and Machine Learning in Emerging Applications (Deep-ML). IEEE.
Hamza, M., & Arshad, H. (2024). Effectiveness of Scrum Master in Agile projects. International Journal of Engineering Applied Sciences and Technology, 9(5), 51–60. https://doi.org/10.33564/IJEAST.2024.v09i05.006
Henríquez, P. A., & Ruz, G. A. (2018). Twitter sentiment classification based on deep random vector functional link. In 2018 International Joint Conference on Neural Networks (IJCNN). IEEE.
Hintalapudi, N., Battineni, G., & Amenta, F. (2021). Sentimental analysis of COVID-19 tweets using deep learning models. Infectious Disease Reports, 13(2), 329–339.
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.
Hota, S., & Pathak, S. (2018). KNN classifier-based approach for multi-class sentiment analysis of Twitter data. International Journal of Engineering and Technology, 7(3), 1372–1375.
Hota, S., & Pathak, S. (2018). KNN classifier-based approach for multi-class sentiment analysis of Twitter data. International Journal of Engineering and Technology, 7(3), 1372–1375.
Huq, M. R., Ali, A., & Rahman, A. (2017). Sentiment analysis on Twitter data using KNN and SVM. International Journal of Advanced Computer Science and Applications, 8(6), 19–25.
Kausar, M. A., Soosaimanickam, A., & Nasar, M. (2021). Public sentiment analysis on Twitter data during COVID-19 outbreak. International Journal of Advanced Computer Science and Applications, 12(2).
Kausar, M. A., Soosaimanickam, A., & Nasar, M. (2021). Public sentiment analysis on Twitter data during COVID-19 outbreak. International Journal of Advanced Computer Science and Applications, 12(2).
Kavitha, P. (2021). Twitter sentiment analysis using syntactic action rule-based decision regression. Annals of the Romanian Society for Cell Biology, 6037–6049.
Kazanova, M. M. (2016). Sentiment140 dataset with 1.6 million tweets.
Khan, M., Malviya, A., & Yadav, S. K. (2020). Big data approach of sentiment analysis of Twitter data using K-means clustering approach. International Journal of Mechanical and Production Engineering Research and Development, 10(3), 6127–6134.
Kharde, V., & Sonawane, P. (2016). Sentiment analysis of Twitter data: A survey of techniques. arXiv. https://arxiv.org/abs/1601.06971
López-Chau, A., Valle-Cruz, D., & Sandoval-Almazán, R. (2020). Sentiment analysis of Twitter data through machine learning techniques. In Software Engineering in the Era of Cloud Computing (pp. 185–209). Springer.
Luzuriaga, A. I., De Groot, G. D. A., Cortez, J. E., Babanto, N. U., & Ejusa, M. C. (2025). Parking occupant management system using QR code solutions with AES algorithm. American Journal of Smart Technology and Solutions, 4(2), 49–56. https://doi.org/10.54536/ajsts.v4i2
Mahum, R., et al. (2021). A novel hybrid approach based on deep CNN features to detect knee osteoarthritis. Sensors, 21(18), 6189.
Mahum, R., et al. (2021). A novel hybrid approach based on deep CNN to detect glaucoma using fundus imaging. Electronics, 11(1), 26.
Mahum, R., et al. (2022). A novel framework for potato leaf disease detection using an efficient deep learning model. Human and Ecological Risk Assessment, 1–24.
Mahum, R., et al. (2022). A robust framework to generate surveillance video summaries using combination of Zernike moments, R-transform and deep neural network. Multimedia Tools and Applications, 1–25.
Melville, P., Gryc, W., & Lawrence, R. D. (2009). Sentiment analysis of blogs by combining lexical knowledge with text classification. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.
Mittal, N., et al. (2015). A hybrid approach for Twitter sentiment analysis.
Mullen, T., & Collier, N. (2004). Sentiment analysis using support vector machines with diverse information sources. In Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing.
Munir, M. H., et al. (2022). An automated framework for coronavirus severity detection using combination of AlexNet and Faster R-CNN.
Pang, B., & Lee, L. (2005). Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. arXiv. https://arxiv.org/abs/cs/0506075
Pang, B., Lee, L., & Vaithyanathan, S. (2002). Thumbs up? Sentiment classification using machine learning techniques. arXiv. https://arxiv.org/abs/cs/0205070
Patel, R., & Passi, K. (2020). Sentiment analysis on Twitter data of world cup soccer tournament using machine learning. IoT, 1(2), 14.
Patel, R., & Passi, K. (2020). Sentiment analysis on Twitter data of world cup soccer tournament using machine learning. IoT, 1(2), 14.
Pereira, D. A. (2021). A survey of sentiment analysis in the Portuguese language. Artificial Intelligence Review, 54(2), 1087–1115.
Poria, S., et al. (2018). Multimodal sentiment analysis: Addressing key issues and setting up the baselines. IEEE Intelligent Systems, 33(6), 17–25.
Ragini, J. R., Anand, P. R., & Bhaskar, V. (2018). Mining crisis information: A strategic approach for detection of people at risk through social media analysis. International Journal of Disaster Risk Reduction, 27, 556–566.
Rathi, M., et al. (2018). Sentiment analysis of tweets using machine learning approach. In 2018 Eleventh International Conference on Contemporary Computing (IC3). IEEE.
Rathi, M., et al. (2018). Sentiment analysis of tweets using machine learning approach. In 2018 Eleventh International Conference on Contemporary Computing (IC3). IEEE.
Reimers, N., & Gurevych, I. (2019). Alternative weighting schemes for ELMo embeddings. arXiv. https://arxiv.org/abs/1904.02954
Rodrigues, A. P., & Chiplunkar, N. N. (2019). A new big data approach for topic classification and sentiment analysis of Twitter data. Evolutionary Intelligence, 1–11.
Ruz, G. A., Henríquez, P. A., & Mascareño, A. (2020). Sentiment analysis of Twitter data during critical events through Bayesian networks classifiers. Future Generation Computer Systems, 106, 92–104.
Saleena, N. (2018). An ensemble classification system for Twitter sentiment analysis. Procedia Computer Science, 132, 937–946.
Savage, D. A., & Torgler, B. (2013). The emergence of emotions and religious sentiments during the September 11 disaster. Motivation and Emotion, 37(3), 586–599.
Setik, R., Ahmad, R. M. T. R. L., & Marjudi, S. (2021). Exploring classification for sentiment analysis from halal-based tweets. In 2021 2nd International Conference on Artificial Intelligence and Data Sciences (AiDAS). IEEE.
Sheikh, A., Sheikh, M. S., & Rinvee, T. M. (2025). Smart transportation systems with artificial intelligence: Enhancing efficiency, safety, and sustainability. American Journal of Smart Technology and Solutions, 4(2), 87–90. https://doi.org/10.54536/ajsts.v4i2
Sindhu, C., & Vadivu, G. (2021). Fine grained sentiment polarity classification using augmented knowledge sequence-attention mechanism. Microprocessors and Microsystems, 81, 103365.
Singh, V., et al. (2013). Sentiment analysis of textual reviews: Evaluating machine learning, unsupervised and SentiWordNet approaches. In 2013 5th International Conference on Knowledge and Smart Technology (KST). IEEE.
Singh, Y., Bhatia, P. K., & Sangwan, O. (2007). A review of studies on machine learning techniques. International Journal of Computer Science and Security, 1(1), 70–84.
Srikanth, J., et al. (2022). Sentiment analysis on COVID-19 Twitter data streams using deep belief neural networks. Computational Intelligence and Neuroscience.
Stappen, L., et al. (2021). Sentiment analysis and topic recognition in video transcriptions. IEEE Intelligent Systems, 36(2), 88–95.
Stappen, L., et al. (2021). The multimodal sentiment analysis in car reviews (MUSE-CAR) dataset: Collection, insights and improvements. IEEE Transactions on Affective Computing.
Tan, S., & Zhang, J. (2008). An empirical study of sentiment analysis for Chinese documents. Expert Systems with Applications, 34(4), 2622–2629.
Tanaka, H., Shinnou, H., Cao, R., Bai, J., & Ma, W. (2019). Document classification by word embeddings of BERT. In Computational Linguistics: 16th International Conference of the Pacific Association for Computational Linguistics (PACLING 2019) (pp. 145–154).
Téllez, E. S., et al. (2017). A case study of Spanish text transformations for Twitter sentiment analysis. Expert Systems with Applications, 81, 457–471.
Turney, P. D. (2002). Thumbs up or thumbs down? Semantic orientation applied to unsupervised classification of reviews. arXiv. https://arxiv.org/abs/cs/0212032
Zhu, S., et al. (2013). Chinese microblog sentiment analysis based on semi-supervised learning. In Semantic Web and Web Science (pp. 325–331). Springer.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Afrasiab Khan, Rabbia Mahum, Md Hamza (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.

