O ffend ES : A New Corpus in S panish for Offensive Language Research (2021)

Abstract: Offensive language detection and analysis has become a major area of research in Natural Language Processing. The freedom of participation in social media has exposed online users to posts designed to denigrate, insult or hurt them according to gender, race, religion, ideology, or other personal characteristics. Focusing on young influencers from the well-known social platforms of Twitter, Instagram, and YouTube, we have collected a corpus composed of 47,128 Spanish comments manually labeled on offensive pre-defined categories. A subset of the corpus attaches a degree of confidence to each label, so both multi-class classification and multi-output regression studies are possible. In this paper, we introduce the corpus, discuss its building process, novelties, and some preliminary experiments with it to serve as a baseline for the research community.

## introduction offensive language is defined as the text which uses hurtful, derogatory, or obscene terms made by one person to another person @xcite . related terms in the literature are hate speech @xcite , cyberbullying @xcite , toxic language @xcite , aggression language @xcite , or abusive language @xcite . although there are subtle differences in meaning, they are all compatible with the above general definition. due to the well-acknowledged rise in digital social interactions, in particular on social media platforms, the amount of offensive language is also steadily growing. unfortunately, this type of prejudiced communication can be extremely harmful and could lead to negative psychological effects among online users, especially among young people, causing anxiety, harassment, and even suicide in extreme cases @xcite . at the same time, this issue also implicates governments, online communities, and social media platforms. in order to help fight this problem, these stakeholders are continuously taking appropriate actions to implement laws and policies combating hate speech. for instance, since 2013 the council of europe has sponsored the "no hate speech" movement foot_0 seeking to mobilize young people to combat hate speech and promote human rights online. in may 2016, the european commission reached an agreement with facebook, microsoft, twitter, and youtube to create a "code of conduct on countering illegal hate speech online" foot_1 . from 2018 to 2020, platforms such as instagram, snapchat, and tiktok adopted the code. according to a spanish report in 2019 on the evolution of hate crimes in spain foot_2 , threats, insults, and discrimination are counted as the most repeated criminal acts, with the internet (54.9%) and social media (17.2%) as the most widely used media to commit these actions. to help achieve this goal, automatic systems based on natural language processing (nlp) techniques are required. to train these systems, corpora labeled on offensive language are essential. in recent years, the nlp community has invested considerable effort into resource generation. however, most of them have been directed towards english, even though it is a global concern and there are important cultural differences depending on the language examined. in addition, most of them have been focused on twitter data, despite the presence of offensive language on other platforms such as youtube or instagram, which more widely used by young people. to contribute to filling this gap, in this paper 4 1097 we present offendes, a spanish collection of comments manually labeled for offensive content using a fine-grained annotation scheme. we collect our data from young influencers from well-known social platforms including twitter, instagram, and youtube. therefore, a comparative study of offensive behavior in social media and its relationship with the influencers is conducted. finally, we propose preliminary experiments to serve as a baseline for the nlp community in which we show the validity of the corpus. the remaining of the paper is organized as follows. section 2 describes the related work on offensive language including some available datasets. section 3 introduces our offendes dataset and some descriptive statistics. section 4 depicts our baseline evaluation of the novel dataset. a discussion is provided in section 5. finally, we conclude with our future studies in section 6. ## offendes dataset in this section, we describe the context of the dataset, the methodology followed to collect it and the annotation scheme proposed to label offensive content. besides, we give some descriptive statistics and a detailed analysis of the collected data. offendes is available upon request to the authors. ## baseline system in order to establish a baseline for the offendes corpus, we conducted experiments based on three different approaches: simple majority class model. our simplest classifier assigns the majority class of the training set, i.e., the no class, to each instance in the test set. this results in accuracy values of 58.78% and 64.85% respectively for 3-ann and 10-ann subsets. lexicon-based model. we also developed a lexicon-based approach using the lexical resources described in section 3.2. in this approach, we only consider a binary classification scenario: whether the comment is offensive or not. for the 3-ann subset, we obtained 67.13% of accuracy, 21.27% precision, 83.78% recall, and 33.93% f1. for the 10-ann subset, the values of accuracy, precision, recall and f1 were, respectively, 71.45%, 35.59%, and 81.60%, 49.56%. transformer-based model. finally, we experimented with a spanish pre-trained bert model called beto @xcite which has shown promising results in offensive language detection tasks (plaza-del-arco et al., 2020). details about different configurations of the beto model and the training process are given in the appendix. in order to evaluate the model, we sampled from the collection two different sets, for training and evaluation. measures used to report performance are precision (p), recall (r), and f1-score (f1) at class level, and macro and weighted average of these metrics. for the multi-output regression task, since we are not dealing with a multi-class scenario, we used one of the most preferred metrics for regression tasks, the mean squared error (mse), a risk metric corresponding to the expected value of the squared (quadratic) error or loss. ## discussion one of the main characteristics of the corpus is its imbalance at all levels: comments are not uniformly distributed across labels, influencers, or social platforms. the corpus size allows for stratified random sampling over those dimensions, but we considered that releasing the full set of comments is the best choice to allow researchers to decide on how to prepare their experiments. that is also the reason why comments with none class have been kept in the corpus, so different studies on the use of language within groups of young users of social networks can be conducted. also, the none label is of interest by itself, as it reflects the absence of consensus in determining the nature of the comment. results show that deep learning models, like bert, are good estimators of the presence of different kinds of offensive language, but that it is still a challenging task to decide whether a comment is directed to a person or not (so cyber-bullying risk could be measured). despite the fusion of noe and ofo categories, precision values for all labels different from no are low. ## conclusion and future work in this paper, we described offendes: the first large-scale spanish dataset of user comments on influencer posts from instagram, youtube and twitter. it consists of 47,128 comments manually labeled for offensive content using a fine-grained annotation scheme. a subset of the corpus (10-ann) assigns a confidence degree allowing both multi-class classification and multi-output regression studies. additionally, a preliminary analysis of offensive behavior in social media and its relationship with the selected influencers is presented. finally, baselines experiments have been performed, showing the validity of the corpus as well as the difficulty of the task. a number of challenges remain open. on the one hand, we plan to explore systems trained on offendes to monitor offensive messages in online channels participated by young people. on the other hand, the gender of the commenters and the subject of the comments have been left out for deeper analysis, so further research could be shed light on these matters. finally, we believe that this dataset enables future work in the nlp community to tackle these interesting issues regarding spanish language.