Social Media Data Analysis for M alayalam Y ou T ube Comments: Sentiment Analysis and Emotion Detection using ML and DL Models (2023)

Abstract: In this paper, we present a study on social media data analysis of Malayalam YouTube comments, specifically focusing on sentiment analysis and emotion detection. Our research aims to investigate the effectiveness of various machine learning (ML) and deep learning (DL) models in addressing these two tasks. For sentiment analysis, we collected a dataset consisting of 3064 comments, while for two-class emotion detection, we used a dataset of 817 comments. In the sentiment analysis phase, we explored multiple ML and DL models, including traditional algorithms such as Support Vector Machines (SVM), Naïve Bayes, K-Nearest Neighbors (KNN), MLP Classifier, Decision Tree, and Random Forests. Additionally, we utilized DL models such as Recurrent Neural Networks (RNN), LSTM, and GRU. To enhance the performance of these models, we preprocessed the Malayalam YouTube comments by tokenizing and removing stop words. Experimental results revealed that DL models achieved higher accuracy compared to ML models, indicating their ability to capture the complex patterns and nuances in the Malayalam language. Furthermore, we extended our analysis to emotion detection, which involved dealing with limited annotated data. This task is closely related to social media data analysis. For emotion detection, we employed the same ML models used in the sentiment analysis phase. Our dataset of 817 comments was annotated with two emotions: Happy and Sad. We trained the models to classify the comments into these emotion classes and analyzed the accuracy of the different models.

## introduction social media platforms have revolutionized the way people communicate and express their opinions. with the exponential growth of user-generated content, analyzing social media data has become essential for understanding public sentiment and emo-tional responses. in this context, youtube, one of the most popular video-sharing platforms, provides a wealth of data in the form of user comments. analyzing these comments can offer valuable insights into the sentiments and emotions of viewers, which can be utilized for various applications, such as content recommendation, user engagement, and market research. this work focuses on social media data analysis for malayalam youtube comments, specifically targeting sentiment analysis and emotion detection. malayalam, a dravidian language predominantly spoken in the indian state of kerala, presents unique challenges due to its complex grammar and distinct linguistic features. analyzing sentiments and emotions in malayalam comments requires a deep understanding of the language's nuances and cultural context.the main challenge of the malayalam language is the lack of an available annotated dataset @xcite .therefore, we have begun our work by creating our own dataset. the primary objective of this research is to explore the effectiveness of different machine learning (ml) and deep learning (dl) models in tackling sentiment analysis and emotion detection tasks for malayalam youtube comments. sentiment analysis aims to classify comments as positive, negative, or neutral, providing an overall sentiment polarity associated with the content. on the other hand, emotion detection focuses on categorizing comments into predefined emotion classes, such as happiness, anger, sadness, or surprise,etc. to conduct this study, we collected a sizable dataset of 3,064 comments for sentiment analysis and an additional 817 comments for two-class emotion detection. we employed various ml and dl models, including traditional algorithms such as support vector machines (svm), naive bayes, k-nearest neighbors (knn), mlp classifier, decision tree, and random forests. additionally, we utilized dl models such as recurrent neural networks (rnn), lstm, and gru. the dataset was preprocessed by tokenizing the comments and removing stopwords to enhance the models' performance. the main focus of our investigation is to compare the accuracy of the ml and dl models in sentiment analysis and emotion detection tasks. we hypothesize that dl models will outperform ml models due to their ability to capture complex patterns and linguistic nuances present in the malayalam language. the findings of this study will contribute to the growing field of social media analytics, providing valuable insights into the sentiment and emotional responses of youtube users in the malayalam language. overall, this work aims to shed light on the effectiveness of ml and dl models for social media data analysis of malayalam youtube comments, emphasizing the importance of accurately understanding sentiments and emotions expressed in regional languages. the outcomes of this study can benefit content creators, marketers, and researchers seeking to leverage social media data for decisionmaking and understanding user preferences in the context of malayalam youtube content. ## literature social media platforms have become prominent sources of user-generated content, providing vast amounts of data for analysis. with the increasing popularity of regional languages, there is a growing need to develop effective techniques for analyzing text data in languages other than english. in the context of malayalam, a dravidian language predominantly spoken in kerala, india, social media data analysis using machine learning (ml) and deep learning (dl) models has gained attention. this literature review examines relevant studies focusing on social media data analysis of malayalam text data, specifically employing ml and dl models.most of the malayalam social media data analysis work is carried out in sentiment analysis problem.the we conducted a survey on several social media data analysis problems, including offensive language identification, part-of-speech tagging, emotion detection, sarcasm detection, humor detection, and more, in various languages. the in summary, the literature review demonstrates a growing interest in social media data analysis of malayalam text data using ml and dl models. existing studies have explored sentiment analysis and emotion detection, highlighting the effectiveness of both traditional ml algorithms and advanced dl models in capturing sentiments and emotions expressed in malayalam text. however, the focus has been on specific domains or platforms, such as news headlines, tweets, or movie reviews, leaving a gap in the analysis of malayalam youtube comments. this work aims to fill this gap by implementing sentiment analysis and emotion detection specifically for malayalam youtube comments using ml and dl models. ## objectives the goals of this work is to explore the application of machine learning (ml) and deep learning (dl) models for social media data analysis of malayalam text data, with a specific focus on sentiment analysis and emotion detection in malayalam youtube comments. the key objectives of this study are as follows: by achieving these objectives, this work aims to contribute to the field of social media data analysis by providing insights into the effectiveness of ml and dl models for sentiment analysis and emotion detection in the context of malayalam youtube comments. the findings can inform decision-making processes, content recommendation systems, and user engagement strategies for regional language-based social media platforms. ## experimental results and discussion sentiment analysis and emotion detection in our work are carried out using machine learning (ml) and deep learning (dl) techniques, implemented using the python programming language. ## conclusion in this paper addresses the challenges posed by the unavailability of annotated datasets for the malayalam language in the field of natural language processing (nlp). to overcome this challenge, we created our own dataset with manual annotation and focused on two social media problems: sentiment analysis and emotion detection.for sentiment analysis, we utilized a dataset of 3064 annotated comments and implemented various machine learning (ml) and deep learning (dl) models. among the ml models, mlp classifier and knn with 15 neighbors demonstrated the highest accuracy. on the other hand, among the dl models, gru and lstm exhibited the highest accuracy. ml models were trained using tf-idf feature vectorization, while dl models utilized word2vec embeddings.additionally, we implemented two-class emotion detection using ml models, with mlp classifier achieving the highest accuracy.as part of our future work, we aim to increase the size of our dataset and implement more transformer models to further enhance the accuracy of our models.overall, this research highlights the importance of creating annotated datasets for under-resourced languages like malayalam and demonstrates the effectiveness of ml and dl models in addressing sentiment analysis and emotion detection tasks. the findings provide valuable insights for future studies in nlp for the malayalam language and contribute to the growing body of research in this field.