Social Media Hate and Offensive Speech Detection Using Machine Learning method (2024)

Abstract: Even though the improper use of social media is increasing nowadays, there is also technology that brings solutions. Here, improperness is posting hate and offensive speech that might harm an individual or group. Hate speech refers to an insult toward an individual or group based on their identities. Spreading it on social media platforms is a serious problem for society. The solution, on the other hand, is the availability of natural language processing(NLP) technology that is capable to detect and handle such problems. This paper presents the detection of social media’s hate and offensive speech in the code-mixed Telugu language. For this, the task and golden standard dataset were provided for us by the shared task organizer (DravidianLangTech@ EACL 2024)1. To this end, we have employed the TF-IDF technique for numeric feature extraction and used a random forest algorithm for modeling hate speech detection. Finally, the developed model was evaluated on the test dataset and achieved 0.492 macro-F1.

## introduction the growth of communication technology over the past few decades has resulted in a ballooning user active participation on social media. social media is highly utilized for a wide range of activities, including news, business, advertising, etc. however, it simultaneously raises hate and offensive speech @xcite . one of the reasons for this prevalence is users post improper information on social media. hate speech on the social media platform can be in the form of text, images, or videos. the text mode, particularly is the most prevalent type of harmful content on social media @xcite . hate speech refers to an insult that is aimed toward an individual or group based on identities including race, gender, minorities, political parties, religion, nationality, and public figures @xcite . today, several federal and international organizations pledged to combat hate speech online @xcite . however, many communities use multiple languages and mix their opinion in text mode, so the identification becomes complicated manually. telugu, one of the dravidian languages experiences code-mixed practice and is subjected to this complication. code mixing is the mingling of two or more languages, and it can be difficult to identify toxicity in the multilingual statements @xcite . in this regard, a shared task(dravidianlangtech@eacl 2024) opened a door to participate in the detection of telugu social media hate and offensive speech by providing golden standard datasets. this shared task offered an opportunity for researchers to come up with solutions leveraging existing technology to identify hate speech and objectionable pieces of information. this study aims to determine whether a given comment in code-mixed telugu language contains hate and offensive content and anticipated that the study will improve the detecting efficiency and handle all aspects of language. in the study @xcite , a deep learning method for identifying harmful and hostile content on arabic social media platforms like facebook was proposed. the researchers collected 2,000 facebook comments in the tunisian dialect and created two models: a bi-lstm based on an attention mechanism combining the bert for facebook comment classification toward hate speech detection. after evaluating the suggested model, an accuracy of 98.89% was attained. the researchers used a transformer-based model in @xcite to categorize hate speech in roman urdu. furthermore, the first roman urdu pre-trained bert model, known as bert-ru, was created in this work. this research utilized the bert's capabilities starting from scratch and trained on the biggest roman urdu dataset, which consists of 173,714 text messages. with scores of 96.70%, 97.25%, 96.74%, and 97.89% in accuracy, precision, recall, and f-measure, respectively, the created transformer-based model has met the performance metrics. ## system description in this section, we offer thorough information regarding the dataset and the details of experimental tools . moreover, it dives into the format of datasets, preprocessing, and the experimental details. ## result and discussion the random forest algorithm-based model was developed and classified the test dataset into two classes as they are presented in training data. as we can see from ## conclusion in this particular task, we have developed a model to classify social media posts into two binary classes hate and non-hate. the model has used the random forest algorithm method. the numeric features are extracted using tf-idf techniques. the newly developed model has been evaluated with the new unseen test dataset and less performed on a selected algorithm for telugu language text data.