Indonesia Convolutional Neural Network Model for Multi-Class Sentiment Analysis on Twitter with Deep Learning Approach

Ade Putra Erwanda, Al Khaidar, Nurdin NurdinNon-Scopus15 Oktober 2025Afiliasi: ID

Abstrak

Social media, especially Twitter, has become an important space for people to express opinions, emotions, and views on various issues. Sentiment analysis on Twitter text is a relevant approach to understanding people's emotional tendencies. However, most previous studies still focus on binary classification, making it less able to describe expressions. This study aims to implement a Convolutional Neural Network (CNN) model in multi-class sentiment analysis on Twitter data using a deep learning approach. The dataset used was obtained from Hugging Face with 11,324 entries in the form of text (tweets) without sentiment labels. The research stages include text preprocessing, application of lexicons for initial labeling, construction of a CNN architecture using embedding layers, convolutional layers, global max pooling, and dense layers with softmax activation. The model was compiled using categorical crossentropy as a loss function and the Adam optimizer, then drilled and tested using training and test data. The results show that the CNN is able to achieve a total accuracy of 97% with high precision, recall, and f1-score in almost all emotion classes. In terms of efficiency, the model requires only 37.96 seconds of execution time and uses 0.106 GB of memory, making it lightweight and efficient. Thus, CNN has proven effective in performing multi-class sentiment analysis on Twitter and has the potential to serve as a benchmark in the development of deep learning-based public opinion analysis systems.

Identifier

Scroll to Top