Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jan 4;15(1):795.
doi: 10.1038/s41598-025-85392-6.

Sentiment analysis of tweets employing convolutional neural network optimized by enhanced gorilla troops optimization algorithm

Affiliations

Sentiment analysis of tweets employing convolutional neural network optimized by enhanced gorilla troops optimization algorithm

Fang Li et al. Sci Rep. .

Abstract

Sentiment analysis has become a difficult and important task in the current world. Because of several features of data, including abbreviations, length of tweet, and spelling error, there should be some other non-conventional methods to achieve the accurate results and overcome the current issue. In other words, because of those issues, conventional approaches cannot perform well and accomplish results with high efficiency. Emotional feelings, such as fear, anxiety, or traumas, often stem from many psychological issues experienced during childhood that can persist throughout life. In addition, people discuss and share their ideas on social media, often unconsciously representing their hidden emotions in the comments. This study is about sentiment analysis of tweets shared by several people. In fact, sentiment analysis can determine whether the shared comments and tweets are positive or negative. The paper introduces the use of a Convolutional Neural Network (CNN), a kind of neural network, optimized by the Enhanced Gorilla Troops Optimization Algorithm (CNN-EGTO). Two datasets provided by the SemEval-2016 are used to evaluate the system, while the polarity of tweets were manually determined. It was determined by the findings of the present study that the suggested model could approximately achieve the values of 98%, 95%, 98%, and 96.47% for accuracy, precision, recall, and F1-score, respectively, for positive polarity. In addition, the suggested model could gain the values of 97, 96, 98, and 97.49 for precision, recall, accuracy, and F1-score, respectively, for negative polarity. Consequently, it was found that the suggested model could outperform the other models by considering their performance and efficiency. These values of performance metrics represent that the suggested model could determine the polarity of sentence, positive or negative, with great efficiency.

Keywords: Convolutional neural network; Enhanced gorilla optimization algorithm; Sentiment analysis; Supervised learning; Twitter.

PubMed Disclaimer

Conflict of interest statement

Declarations. Competing interests: The authors declare no competing interests.

Figures

Fig. 1
Fig. 1
The structure of Convolutional Neural Network.
Fig. 2
Fig. 2
The flowchart of the suggested algorithm.
Fig. 3
Fig. 3
The performance metrics of various approaches and the suggested in classifying the tweets regarding positive polarity.
Fig. 4
Fig. 4
The classification efficacy of the suggested model in comparison with several other models regarding negative polarity.

References

    1. Acheampong, F. A., Wenyu, C. & Nunoo-Mensah, H. Text‐based emotion detection: advances, challenges, and opportunities. Eng. Rep.2, e12189 (2020). - DOI
    1. Mehta, P., Pandya, S. & Kotecha, K. Harvesting social media sentiment analysis to enhance stock market prediction using deep learning. PeerJ Comput. Sci.7, e476 (2021). - DOI - PMC - PubMed
    1. Lo, S. L., Chiong, R. & Cornforth, D. Ranking of high-value social audiences on Twitter. Decis. Support Syst.85, 34–48 (2016). - DOI
    1. Bello, A., Ng, S. C. & Leung, M. F. A BERT framework to sentiment analysis of tweets. Sensors23, 506 (2023). - DOI - PMC - PubMed
    1. He, B., Macdonald, C., He, J. & Ounis, I. in Proceedings of the 17th ACM conference on Information and knowledge management. 1063–1072.

Publication types

LinkOut - more resources