Enhanced Text Classification with Convolutional Neural Networks: A Deep Learning Approach

Goldy Verma · 2024

Text classification in natural language processing (NLP) finds applications ranging from sentiment analysis to spam detection, so assigning categories to textual input depends on this procedure. Emphasizing four categories—anger, fear, happiness, and sadness, this work presents a Convolutional Neural Network (CNN) model designed for emotional identification. Leveraging a dataset taken from Kaggle, the model processes text sequences expressed as 50-length vectors with dense 32-dimensional embeddings, hence enabling complex feature extraction via convolutional layers. Ensuring complete model training, the dataset for emotion classification is well-balanced with 2,200 cases each of pleasure and sorrow, 2,159 of anger, and 1,937 of fear. Strong evaluation measures are provided by datasets with different class distribution for testing and validation. A 95% overall accuracy is obtained by the suggested CNN model with outstanding accuracy, recall, and F1-scores across all emotional categories. The results show how effectively the model picks early emotions, therefore enhancing applicability in customer service, mental health monitoring, social media analysis, and mental health research. This work improves NLP by showing a well performing, efficient CNN architecture for emotion classification.

Read the paper · More papers on PaperTik