This paper investigates the effectiveness of selected tools for sentiment analysis, focusing on both dedicated software libraries (NLTK, Pattern, TextBlob) and large language models (ChatGPT and Gemini). The evaluation was conducted in two stages: sentiment analysis of 30 synthetic opinions of varying linguistic complexity, and analysis of 5 sets of real user reviews collected from the web. The results show that large language models - although not explicitly designed for sentiment analysis - achieved the highest accuracy, with ChatGPT consistently producing the lowest deviation from human ratings. In contrast, software libraries showed greater variation, especially in the presence of complex linguistic structures. These findings highlight the potential of large language models in sentiment analysis tasks and underscore their robustness in interpreting nuanced language.
References
Abro, A. A., Talpur, M. S. H., & Jumani, A. K. (2023). Natural language processing challenges and issues: A literature review. Gazi University Journal of Science, 36(4), 1522-1536. https://doi.org/10.35378/gujs.1032517
Bonta, V., Kumaresh, N., & Naulegari, J. (2019). A comprehensive study on lexicon based approaches for sentiment analysis. Asian Journal of Computer Science and Technology, 8(S2),1-6. https://doi.org/10.51983/ajcst-2019.8.S2.2037
Chachal, A., & Gulia, P. (2019). Machine Learning and Deep Learning. International Journal of Innovative Technology and Exploring Engineering, 8(12), 2278-3075. http://dx.doi.org/10.35940/ijitee.L3550.1081219
Hussein, D. M. E. M. (2018). A survey on sentiment analysis challenges. Journal of King Saud University-Engineering Sciences, 30(4), 330-338. https://doi.org/10.1016/j.jksues.2016.04.002
Kaur, F., & Bhatia, R. (2016). Sentiment analyzing by dictionary based approach. International Journal of Computer Applications, 152(5), 32-34. https://doi.org/10.5120/ijca2016911814
Khurana, D., Koli, A., Khatter, K., & Singh, S. (2023). Natural language processing: State of the art, current trends and challenges. Multimedia Tools and Applications, 82, 3713–3744. https://doi.org/10.1007/s11042-022-13428-4
Liu, B. (2012) Sentiment Analysis and Opinion Mining. Morgan & Claypool.
Medhat, W., Hassan, A., & Korashy, H. (2014). Sentiment analysis algorithms and applications: A survey. Ain Shams Engineering Journal, 5(4), 1093-1113. https://doi.org/10.1016/j.asej.2014.04.011
Nandwani, P., & Verma, R. (2021). A review on sentiment analysis and emotion detection from text. Social Network Analysis and Mining, 11, 81. https://doi.org/10.1007/s13278-021-00776-6
Peretz, O., Koren, M., & Koren, O. (2024). Naive Bayes classifier – An ensemble procedure for recall and precision enrichment. Engineering Applications of Artificial Intelligence, 136(Part B), 108972. https://doi.org/10.1016/j.engappai.2024.108972
Raiaan, M. A. K, Mukta, S. H., Fatema, K., Fahad, N. M., Sakib, S., & Mim, M. M. J. (2024). A review on large language models: Architectures, applications, taxonomies, open issues and challenges. IEEE Access, 12, 26839-26874. https://doi.org/10.1109/ACCESS.2024.3365742
Rish, I. (2001). An empirical study of the naïve bayes classifier. IJCAI 2001 Workshop on Empirical Methods in Artificial Intelligence, 41-46.
Taboada, M., Brooke, J., Tofiloski, M., Voll, K., & Stede, M. (2011). Lexicon-based methods for sentiment analysis. Computational Linguistics, 37(2), 267–307. https://doi.org/10.1162/COLI_a_00049
Umarani, V., Juliana, A., & Deepa, J. (2021). Sentiment analysis using various machine learning and deep learning techniques. Journal of the Nigerian Society of Phisical Sciences, 3(4), 385-394. https://doi.org/10.46481/jnsps.2021.308
Wankhade, M., Rao, A. C. S., & Kulkarni C. (2022). A survey on sentiment analysis methods, applications, and challenges. Artificial Intelligence Review, 55, 5731–5780. https://doi.org/10.1007/s10462-022-10144-1
Xu, G., Yu, Z., Yao, H., Li, F., Meng, Y., & Wu, X. (2019). Chinese text sentiment analysis based on extended sentiment dictionary. IEEE Access, 7, 43749-43762. https://doi.org/10.1109/ACCESS.2019.2907772