Contextual-Lexicon Approach for Abusive Language Detection (2021)

Abstract: Since a lexicon-based approach is more elegant scientifically, explaining the solution components and being easier to generalize to other applications, this paper provides a new approach for offensive language and hate speech detection on social media, which embodies a lexicon of implicit and explicit offensive and swearing expressions annotated with contextual information. Due to the severity of the social media abusive comments in Brazil, and the lack of research in Portuguese, Brazilian Portuguese is the language used to validate the models. Nevertheless, our method may be applied to any other language. The conducted experiments show the effectiveness of the proposed approach, outperforming the current baseline methods for the Portuguese language.

## introduction in brazil, hate speech is prohibited. nevertheless, in government and civil society, the regulation of hate speech is not effective due to the difficulty to identify, quantify and classify abusive comments. indeed, this is rather a difficult requirement to satisfy. according to @xcite , the safernet non-governmental organization, which operates in cooperation with public organizations in brazil, as well as companies, such as google, facebook, and twitter, proposed a collection of data on actions that violate human rights. the data is very worrisome: during the 2018 year's election period, denunciations with xenophobia content had an increase of 2,369.5%; apology and public incitement to violence and crimes against life, 630.52%; neo-nazism, 548.4%; homophobia, 350.2%; racism, 218.2%; and religious intolerance, 145.13% foot_0 . figure 1 shows the hate crimes evolution that occurred in the most populous brazilian state foot_1 . the data was collected from são paulo public security government. the pink line provides data on religious intolerance crimes, red on homophobia/transphobia, blue on race/ethnicity/color, green on region/origin, yellow on political intolerance, and light green on other crimes. indeed, it is generally agreed that the high incidence of hate crimes is boosted by the popularization of online social networks. in social media, people and organizations may use the language to defamation, oppression, and terrorism. the language used intentionally in order to disrespect, insult or attack the reader is denominated in literature by abusive language, unless otherwise stated such as offensive language (c ¸öltekin, 2020; @xcite , hate speech @xcite and cyberbullying @xcite . according to @xcite , hate speech is a particular form of abusive lan-guage considering stereotypes to express an ideology of hate. in the same settings, @xcite defines hate speech as "any communication that disparages a person or a group based on some characteristic such as race, color, ethnicity, gender, sexual orientation, nationality, religion, or other characteristic". to the best of our knowledge, no previous methods exist in order to embody an offensive lexicon annotated with contextual information to automatically classify abusive language on social media. therefore, the main contribution of this paper is providing a new method for abusive comment detection on social media. moreover, as already mentioned, due to the severity of the hate crimes in brazil, and the lack of research in this language, brazilian portuguese is the language used to evaluate the proposed method, which showed high performance, outperforming the current baseline methods for portuguese. despite the proposed approach has been orchestrated over brazilian portuguese comments, the method in this paper may be applied to any other language. finally, this paper also presents the evaluation of algorithms used for feature selection. the remainder of the paper is structured as follows. in section 2, we briefly introduce the most relevant related work. section 3 presents a overview of the data. sections 4 and 5 describe the proposed method and the performed experiments. in section 6, we report the evaluation results. in section 7, we make some final remarks. ## related work several efforts have been made to provide automated detection approaches for hate speech and offensive languages on social media @xcite @xcite . the basic state of the art framework consists of creating lists of words that contain sets of known hate keywords. furthermore, corpora are manually annotated in order to construct training datasets labeled with hate speech and non-hate speech. at last, automated methods of learning, such as traditional machine learning or neural-based machine learning, are used to automatically detect hate speech in social media texts. however, most hate speech resources and models are proposed for english @xcite @xcite @xcite . for portuguese, @xcite adopted the definition of hate speech proposed by @xcite , and proposed a new dataset composed of 5,668 tweets, as well as automated methods using a hierarchy of hate to identify social groups of discrimination. the authors have obtained 78% f1-score using a neural network (lstm). additionally, de pelle and moreira (2017) provide a new dataset composed of 1,250 comments collected from g1 brazilian online newspaper and annotated with offensive and non-offensive tags. in addition, the authors present classification results achieved by classical machine learning algorithms (smv and nb), reporting results over 81% f1-score. ## the proposed approach we present a new approach to detect abusive comments on the web and social media. our method embodies an offensive lexicon, which provides contextual information on hate speech and offenses. we show in detail our approach in sections 4.1, 4.2, and 4.3. ## experiments we carried out a wide variety of experiments. we describe the entire process in sections 5.1, 5.2, 5.3 and 5.4. ## results as shown in moving forward, the conducted experiments also show that the traditional machine learning techniques presented better performance than neural-based classifiers for offensive language tasks. nevertheless, for the hate speech detection task, the neural-based classifier overcame the traditional machine learning methods. in general, bert and fasttext, as shown in considering the feature selection (fs) performance, as shown in ## conclusions in this work, we provide a new approach for the automatic detection of abusive comments on social media. our approach embodies an offensive lexicon that provides contextual information. due to the increase of abusive comments on social media in brazil, as well as the lack of research in portuguese, we decided to use an brazilian annotated dataset to evaluate the models. the proposed approach obtains high performances: 88% f1-score for offensive comments detection, and 85% for comments with hate speech, which overcame the current baseline methods for portuguese. we also evaluated the performance of feature selection (fs) methods, and conclude that infogain algorithm is the best algorithm for the offensive comment detection task, considering the obtained gains in recall and f1-score. for the hate speech detection task, cfs algorithm obtained better performance. accordingly, based on the obtained results, we concluded that the proposed approach in this paper for automated detection of abusive comments is efficient and highly relevant, bearing in mind the current brazilian social scenario, in which hateful comments are a very relevant social problem. moreover, in the next year (2022), there will be presidential elections in brazil, and this paper may provide a reliable automated approach for abusive comments detection in order to minimize political polarization, as well as hate crimes on social media.