2022 ‹ Številka 1 ‹ letnik XXX ‹ issn 1318-1882 01 UPORABNA INFORMATIKA 2022 ŠTEVILKA 1 JAN/FEB/MAR LETNIK XXX ISSN 1318-1882 Znanstveni prispevki Maša Kljun, Matija Teršek, Slavko Žitnik Pomenska analiza kategorij sovražnega govora v obstojecih oznacenih korpusih 3 Jan Bajt, Marko Robnik Šikonja Strojna analiza tematik in sentimenta slovenskih novicarskih medijev 19 Strokovni prispevki Alenka Baggia, Robert Leskovar, Branislav Šmitek, Saša Mlakar, Katja Pesjak, Mateja Bahun, Manuel Lillo-Crespo, Jorge Riquelme Galindo, Christine FitzGerald, Liz Kingston, Alice Coffey, Lucia Cadorin, Alvisa Palese, Barbara Narduzzi, Sara Scarsini, Uroš Rajkovic E-ucilnica za ucenje na dokazih podprte zdravstvene nege 37 Gregor Polancic, Mateja Kocbek Bule Stanje in trendi na podrocju rudarjenja procesov 51 Živa Rant, Dalibor Stanimirovic, Jure Janet Funkcionalnosti in uporaba portala za paciente zVEM in Centralnega registra podatkov o pacientu 63 Prispevki iz Konference Dnevi slovenske informatike Matjaž Kragelj, Mirjana Kljajic Borštnar, Alenka Brezavšcek Problematika ohranjanja zasebnosti pri podatkovnem rudarjenju dokumentov z obcutljivimi podatki 74 Informacije Iz slovarja 84 UPORABNA INFORMATIKA INFORMATIKA 2022 ŠTEVILKA 1 JAN/FEB/MAR LETNIK XXX ISSN 1318-1882 Ustanovitelj in izdajatelj Slovensko druptvo INFORMATIKA Litostrojska cesta 54, 1000 Ljubljana Predstavnik Niko Schlamberger Odgovorni urednik Saša Divjak Uredniški odbor Andrej Kovacic, Evelin Krmac, Ivan Rozman, Jan Mendling, Jan von Knop, John Taylor, Jurij Jaklic, Lili Nemec Zlatolas, Marko Hölbl, Mirjana Kljajic Borštnar, Mirko Vintar, Pedro Simőes Coelho, Saša Divjak, Sjaak Brinkkemper, Slavko Žitnik, Tatjana Welzer Družovec, Vesna Bosilj-Vukšic, Vida Groznik, Vladislav Rajkovic Recenzentski odbor Aleksander Sadikov, Alenka Kavcic, Aljaž Košmerlj, Andrej Kovacic, Bor Plestenjak, Borut Batagelj, Borut Weber, Borut Werber, Borut Žalik, Branko Kavšek, Branko Šter, Ciril Bohak, Danijel Skocaj, David Jelenc, Dejan Georgiev, Dejan Lavbic, Denis Trcek, Domen Mongus, Eva Krhac, Evelin Krmac, Inna Novalija, Irena Nancovska Šerbec, Ivan Gerlic, Jernej Vicic, Jure Žabkar, Katarina Puc, Lovro Šubelj, Luka Cehovin, Luka Pavlic, Marina Trkman, Marjan Hericko, Marjan Krisper, Marko Bajec, Marko Hbl, Marko Robnik Šikonja, Matej Klemen, Matevž Pesek, Matjaž Divjak, Mirjana Kljajic Borštnar, Mladen Borovic, Muhamed Turkanovic, Niko Schlamberger, Nikola Ljubešic, Patricio Bulic, Peter Trkman, Polona Rus, Sandi Gec, Saša Divjak, Slavko Žitnik, Uroš Godnov, Uroš Rajkovic, Vida Groznik, Vladislav Rajkovic, Vlado Stankovski, Živa Rant Tehnicni urednik Slavko Žitnik Lektoriranje angleških izvleckov Marvelingua (angl.) Oblikovanje KOFEIN DIZAJN, d. o. o. Prelom in tisk Boex DTP, d. o. o., Ljubljana Naklada 200 izvodov Naslov uredništva Slovensko druptvo INFORMATIKA Uredniptvo revije Uporabna informatika Litostrojska cesta 54, 1000 Ljubljana www.uporabna-informatika.si Revija izhaja Ëetrtletno. Cena posamezne ptevilke je 20,00 EUR. Letna naroËnina za podjetja 85,00 EUR, za vsak nadaljnji izvod 60,00 EUR, za posameznike 35,00 EUR, za ptudente in seniorje 15,00 EUR. V ceno je vkljuËen DDV. Revija Uporabna informatika je od ptevilke 4/VII vkljuËena v mednarodno bazo INSPEC. Revija Uporabna informatika je pod zaporedno ptevilko 666 vpisana v razvid medijev, ki ga vodi Ministrstvo za kulturo RS. Revija Uporabna informatika je vkljuËena v Digitalno knjićnico Slovenije (dLib.si). ź Slovensko druptvo INFORMATIKA Vabilo avtorjem .torjev z najpirpega podroËja informatike v poslovanju podjetij, javni upravi in zasebnem ćivljenju na znanstveni, strokovni in informativni ravni; pe posebno spodbujamo objavo interdisciplinarnih Ëlankov. Zato vabimo avtorje, da prispevke, ki ustrezajo omenjenim .-informatika.si. . nju ter na naslovu http://www.uporabna-informatika.si. .zirani, o objavi pa na podlagi recenzij samostojno odloËa urednipki odbor. Recenzenti lahko zahtevajo, da avtorji besedilo spremenijo v skladu s priporoËili in da popravljeni Ëlanek ponovno prejmejo v pregled. Uredniptvo pa lahko pe pred recenzijo zavrne objavo prispevka, Ëe njegova vsebina ne ustreza vsebinski usmeritvi revije ali Ëe Ëlanek ne ustreza kriterijem za objavo v reviji. .nost Ëlanka in dovoljuje prenos materialnih avtorskih pravic. NenaroËenih prispevkov ne vraËamo in ne honoriramo. Avtorji prejmejo enoletno naroËnino na revijo Uporabna informatika, ki vkljuËuje avtorski izvod revije in pe nadaljnje tri zaporedne ptevilke. S svojim prispevkom v reviji Uporabna informatika boste prispevali k pirjenju znanja na podroËju informatike. Ćelimo si Ëim veË prispevkov z raznoliko in zanimivo tematiko in se jih će vnaprej veselimo. Uredniptvo revije Navodila avtorjem Ëlankov .dilo naj bo jezikovno skrbno pripravljeno. PriporoËamo zmernost pri uporabi tujk in ‡ .skih ustreznic priporoËamo uporabo spletnega terminolopkega slovarja Slovenskega druptva Informatika Islovar (www.islovar.org). . kov, obvestila in poroËila pa do 8.000 znakov. »lanek naj bo praviloma predloćen v urejevalniku besedil Word (*.doc ali *.docx) v .ka napravite samo en prazen prostor, pri odstavkih ne uporabljajte zamika. Naslovu Ëlanka naj sledi za vsakega avtorja polno ime, ustanova, v kateri je zaposlen, naslov in elektronski naslov. Sledi naj povzetek v slovenpËini v obsegu 8 do 10 vrstic in seznam od 5 do 8 kljuËnih besed, ki najbolje opredeljujejo vsebinski okvir Ëlanka. Pred .ne kljuËne besede v anglepËini. Obratno velja v primeru predloćitve Ëlanka v anglepËini. Razdelki naj bodo naslovljeni in optevilËeni z arabskimi ptevilkami. Slike in tabele vkljuËite v besedilo. Opremite jih z naslovom in optevilËite z arabskimi ptevilkami. Vsako sliko in tabelo razloćite tudi v besedilu Ëlanka. »e v Ëlanku uporab­ljate slike ali tabele drugih avtorjev, navedite vir pod sliko oz. tabelo. Revijo tiskamo v Ërno-beli tehniki, zato barvne slike ali fotografije kot original niso primerne. Slik zaslonov ne objavljamo, razen Ëe so nujno potrebne za razumevanje besedila. Slike, .pajih desno od enaËbe. V besedilu se sklicujte na navedeno literaturo skladno s pravili sistema APA navajanja bibliografskih referenc, najpogosteje torej v obliki (Novak & KovaË, 2008, str. 235). Na koncu Ëlanka navedite samo v Ëlanku uporabljeno literaturo in vire v enotnem seznamu po abecednem redu avtorjev, prav tako v skladu s pravili APA. VeË o sistemu APA, katerega uporabo omogoËa tudi urejevalnik besedil Word 2007, najdete na strani http://owl.english.purdue.edu/owl/resource/560/01/. »lanku dodajte kratek ćivljenjepis vsakega avtorja v obsegu do 8 vrstic, v katerem poudarite predvsem strokovne dosećke. Pomenska analiza kategorij sovražnega govora v obstojecih oznacenih korpusih Maša Kljun, Matija Teršek, Slavko Žitnik Univerza v Ljubljani, Fakulteta za racunalništvo in informatiko, Vecna pot 113, SI-1000 Ljubljana mk2700@student.uni-lj.si, mt2421@student.uni-lj.si, slavko.zitnik@fri.uni-lj.si Izvlecek Trenutno je dostopnih mnogo angleških korpusov z oznacenimi razlicnimi kategorijami žaljivega govora, razlicnimi nacini oznacevanja in poimenovanja kategorij. V tem prispevku analiziramo 21 kategorij žaljivega oz. sovražnega govora. Pri tem uporabimo metode obdelave naravnega jezika na sedem razlicnih korpusih, da lahko odkrivamo korelacije med posameznimi kategorijami. Analizo izve.demo s pomocjo tradicionalnih (TF–IDF) in naprednih (fastText, GloVe, Word2Vec, BERT in ostale globoke metode) tehnik, s kateri.mi želimo odkriti zakonitosti med posameznimi kategorijami sovražnega govora. Rezultati razkrijejo, da je vecina kategorij mocno povezana med seboj, vendar lahko kljub temu izdelamo dvonivojsko hierarhicno predstavitev povezanosti. Analizo izdelamo tudi za slovenski jezik in primerjamo rezultate za oba izbrana jezika. Kljucne besede: žaljivi govor, sovražni govor, obdelava naravnega jezika, vektorske vložitve besed Abstract There exists a vast amount of different offensive language corpora for English language, annotation criteria and category naming. In this paper, we explore 21 different categories of offensive language. We use natural language processing techniques to find correlations between the categories based on seven different data sets. We employ several traditional (TF–IDF) and advanced (fa.stText, GloVe, Word2Vec, BERT, and other deep NLP methods) techniques to uncover similarities among different offensive langu.age categories. The findings reveal that most of the categories are densely interconnected, while a two-level hierarchical represen.tation of them can be provided. We also transfer the analysis to the Slovenian language and compare the findings between both researched languages. Keywords: Offensive language, hate speech, natural language processing, word embeddings 1 INTRODUCTION In the last few years, social media grew exponenti.ally, and with it also the ability of people to express themselves online. Enabling people to write on diffe.rent online platforms without even identifying them.selves lead to a new era of freedom of speech. De.spite this new medium for communication bringing many positive things, it also has its downside. Social media has become a place where heated discussions happen and often result in insults and hatred. It is an important task to recognize hate speech and offensi.ve language, and to prevent it. Hate speech is defined as .ech or writing that expresses prejudice against a particular group, especially on the basis of race, religion, or sexual orientation [OUP, 2021]. We can see that the definition is very vague. Having said that, the goal of our paper is to help distinguish different types of hate speech and find the specific keywords of its subgroups in order to explain its structure. This could help with its identification and classification in case someone would use multiple datasets. As there exist no clear definitions of annotated categories, a researcher ne.eds to understand them first and then decide how to use them. In this paper we focus on 21 subgroups of offensive language – abusive, hateful, spam, general hate speech, profane, offensive, cyberbullying, racism, sexism, vulgar, homophobic, slur, harassment, obscene, threat, di.scredit, insult, hostile, toxic, identity hate and benevolent sexism. The goal of this paper is to explore offensive language subgroups and understand the similarities and connections between them. There has been done a lot of research regarding offensive language, however, these works are usual.ly focused on classification. One of the first works in.cludes [Spertus, 1997] who built the decision tree ba.sed classifier Smokey for abusive message recogni.tion and classification. Some other works that focus mainly on classification include [Waseem, 2016], who compare the classification accuracy of models train.ed on expert and amateur annotations, [Gambäck and Sikdar, 2017] use convolutional neural networks for classification into four predefined categories, and [Martins et al., 2018] use different natural language processing techniques for expanding data sets with emotional information for better classification. In the last years, especially deep learning models are often used for detection and classification of hate speech, such as [Rizoiu et al., 2019], who propose a sophisti.cated method that is a combination of a deep neural network architecture with transfer learning. There is .ge data sets, such as [Chung et al., 2019], who create a large-scale, multilingual, expert-based data set of hate speech. What is less common in the research area of of..en different types of the offensive language and the .clude [Xu et al., 2012], who try to separate bullying from other social media posts and try to discover the topic of bullying using topic modeling with Latent Dirichlet Allocation (LDA). [Calder et al., 2020] model hate speech against immigrants on Twitter in Spain. They try to find the underlying topic of hate speech using LDA, discovering features of different dimensions of hate speech, including foul language, humiliation, irony, etc. [Schmidt and Wiegand, 2017] conduct a survey about hate speech detection and de.scribe key areas that have been explored, regarding the topic modeling, as well as sentiment analysis. .cusing on creating a new typology of offensive lan.guage [Banko et al., 2020] or trying to unify offensive language categories across datasets [Salminen et al., 2018, Risch et al., 2021]. None of these research has focused or analyzed existing data in depth. Banko et al. [Banko et al., 2020] proposed a new typology that would require re-annotation of existing data and is therefore only a theoretical ground for further an.notation campaigns. Similarly, Salminen et al. [Sal.minen et al., 2018] propose a new taxonomy, based on existing data sources, annotate a new corpus and perform classification analysis. Risch et al. [Risch et al., 2021] try to combine a multitude of datasets into a single schema. They also provide a unification tool. We cannot agree with the analysis as we show that annotation guidelines and data sources are too much different to directly map them into one schema and that their context should be considered when doing so. We show that different categories of offensive language (as annotated in publicly available corpora) from different datasets do not have a full intersecti.on. In the future, there is a need for comprehensive typology development, along with linguistically-so.und definitions. We organize this paper as follows: we present the data sets and describe data preprocessing in Secti.on 2, we perform the exploratory analysis by using many traditional and neural approaches in Section 3. Furthermore, we use non-contextual embeddings and apply them to the Slovene language in Section 4. In the end, we provide a possible offensive language ontology in Section 5. Note to the reader: this paper includes some explicit examples of offensive language. 2 DATA .ratory analysis. We combine three data sets [Wase.em, 2016], [Waseem and Hovy, 2016], and [Jha and Mamidi, 2017] into one large data set (referred to as SRB) as they include the same categories of hate speech. We create labels sexism, racism, and both from [Waseem, 2016] and [Waseem and Hovy, 2016]. [Jha and Mamidi, 2017] is an extension of the first two. It includes label hostile sexism, which contains tweets from sexism category in the first two data sets, and la.bel benevolent sexism, which we rename to benevolent. Thus, we obtain a data set with 6069 samples that are labeled either sexism, racism, both, or benevolent. Benevolent includes comments that exhibit subjective positive sentiment, but is sexist, while sexism inclu­des tweets that exhibit explicitly negative emotion. The authors do not state what was the criteria to label tweets as racist, but they state that it is easy to iden­tify racist slurs. The next data set (referred to as AHS)[Founta et al., 2018] contains 3 categories – abusive, hateful, spam. Abusive is any strongly impolite, rude, or hurtful lan­guage using profanity, that can show a debasement of someone or something, or show intense emotion. Hateful is language used to express hatred or is in­tended to be derogatory, to humiliate, or to insult the members of the group. Spam consists of posts rela­ted to advertising, phishing, and other kinds of un­wanted information. As we use no data sets that are directly derived from this data set, contrary to the previous three data sets, we show this data set as a separate standalone data set. We obtain 13776 twe­ets with the above mentioned labels. Note that we exclude None label from both data sets, as we do not need it for the analysis. We provide an example for each label: Racism: »He can’t be a server at our restaurant, that beard makes him look like a terrorist.« Everyone laughs. #fuckthanksgiving Sexism: #katieandnikki stop calling yourselves pretty and hot..you’re not and saying it a million ti­mes doesn’t make you either...STFU Benevolent : It’s »NEXT to every successful man, there’s a woman« Spam: RT @OnlyLookAtMino: [!!] #WINNER trending #1 on melon search Abusive: You Worried About Somebody Bein Ugly... Bitch You Ugly... Hateful: i hope leaders just kick retards that fake leave teams today Additionally, we use the data set of comments extracted from the League of Legends community [Bretschneider and Peters, 2016], which we refer to as CYB. Cyberbullying is a process of sending offen­ding messages several times to the same victim by the same offender. We preprocess the data set given in the SQL format to a more readable CSV form and keep only the posts that are annotated as haras­sment. We obtain 259 examples of cyberbullying. The sixth data set that we use was designed for the pro­blem of hate speech identification and classification, but we use the labels from the train and test set and merge them into one big data set that we use for our analysis. It provides tags of hatespeech, profane, and offensive, so we refer to the data set as HPO [Mandl et al., 2019]. It consists of 2549 tweets. Hateful includes messages that describe negative attributes of indivi­duals because they are members of a group or hate­ful comments towards race political opinion, gender, etc. Offensive includes messages that are degrading, dehumanizing, or insulting to an individual, and profane includes messages that contain unacceptable language in the absence of hate and offensive content (for example swearwords). We provide an example for each of the labels. Cyberbullying: plot twist she’s a fggt Hatespeech: Johnson you liar. You don’t give a flying one for the Irish Offensive: #FuckTrump And retired porn star Melania too. Profane: Fuck Trump and anybody who voted for that Lyin POS! #FuckTrump We also use the data set of Wikipedia comments [Wulczyn et al., 2017, Borkan et al., 2019] that are marked as either toxic, severe toxic, obscene, identity hate, threat, and insult. We merge the first two cate­gories into toxic. Most labels here are derived from toxicity, which is defined as anything that is rude, disrecpectful, or unreasonable that would make so­meone want to leave a conversation. It is important to note that each comment in this data set might have multiple labels, so the results for those tags might be similar. The original data set contains 159571 tweets, 16225 of which are labeled. We denote this data set as TOITI in the future text and show the examples for each label: Threat : SHUT UP, YOU FAT POOP, OR I WILL KICK YOUR ASS!!! Obscene: you are a stupid fuck and your mother’s cunt stinks Insult : Fuck you, block me, you faggot pussy! Toxic: What a motherfucking piece of crap those fuckheads for blocking us! Identity : A pair of jew-hating weiner nazi schmucks. We show the distribution of individual categories from data sets in Figure 1. Note that the numbers of samples might not match the numbers in the original papers, due to the removed tweets by Twitter, ma­king them unavailable for us to analyze. We see that toxic, obscene, insult, and spam are far more frequent than other labels, especially compared to threat, ra­cism, and cyberbullying. This varies as the comments were extracted from various social media platforms, which sometimes ban or remove inappropriate com­ments, making them unavailable for us to analyze. The number of comments for each label also depen­ds on the size of the data set – for example, TOITI is much bigger than HPO. Note that two labels are si­milar (hateful and hate), and authors of both data sets use them to classify hate speech oriented towards certain groups because of their social status, disabili­ty, race, religion, ethnic origin, or sexual orientation. However, we do not merge those two labels as data sets are collected from Twitter or Facebook at diffe­rent times, which might influence their content. In addition to the 15 labels from the above men­tioned data sets, we also consider six more offensive language subgroups discredit, harassment, vulgar, ho­mophobic, slur, and hostile, which were not in the ori­ginal five data sets that use. We included those words based on previous analysis done with experts from the linguistics field [Lewandowska-Tomaszczyk et al., 2021]. In this paper, we want to additionally support the claim that category naming in existing offensive datasets is not sound and therefore we ca­nnot clearly distinguish them also using exploratory analysis tools. As the goal of this report is to inspect the deeper structure and gain a new understanding of relation­ships between different subgroups of hate speech, we must also inspect how the data that we work with were annotated. Annotations play a big role in this analysis, as we take them as ground truth, meaning if in the data set some tweet or comment was labeled as e.g., sexism we do not further question this choi­ce and perform all our further analysis accordingly. The used data sets were sampled from different so­cial mediums in a limited period at different times, and in some cases, for a specific topic (e.g., political topic). This influences the analysis. However, as the goal of this paper is to research the connections be­tween various subgroups of hate speech, we do not question whether the data sets are a good represen­tation of the subgroups, yet we are aware of this and keep this in mind during the analysis. Data set [Waseem, 2016] uses both amateur anno­tators from crowdsourcing platform CrowdFlower and annotators with theoretical and applied kno­wledge of hate speech, and use the data set for hate speech detection and classification. [Jha and Mamidi, 2017] manually annotate their data set with the help of a 25-year-old woman studying gender studies and use the data to investigate how different is benevolent sexism from sexism, and also perform classification with SVM. [Founta et al., 2018] again use amateur an­notators from CrowdFlower and want to provide lar­ge annotated data set that is available for further sci­entific exploration. [Bretschneider and Peters, 2016] use three human experts for the annotation and then propose an approach to precisely detect cyberbullies and also provide metrics to identify victims of severe cyberbullying cases. [Mandl et al., 2019] used junior experts for language and they engaged with an on-line system to judge the tweets. Their goal was text classification. [Wulczyn et al., 2017] again use plat­form CrowdFlower, however, they require their an­notators to first pass a test of ten questions to ensure data quality. Their goal is to provide a methodology that will allow them to explore some of the open que­stions about the nature of online personal attacks. EXPLORATORY ANALYSIS In this section, we show the analyses of the offensi­ve language corpora. We especially focus on known NLP techniques that would help us differentiate bet­ween existing offensive language categories that are annotated in the corpora. Our analysis is conducted as follows: (A) First we employ traditional methods such TF–IDF to gather common keywords for the existing categories. (B) We continue using pre-train­ed and custom-trained non-contextual word embed­ding techniques. These enable us to gather a number of relevant vectors and then embed them into two dimensions to investigate possible differences or clu­sterings. (C) Lastly, we use three different contextual word embedding techniques to check for more fine­-grained similarities. Before applying any methods we first preprocess all of our data. We remove retweet text RT, hyper­links, hashtags, taggings, new lines, and zero-length tweets. We further filter out tokens that do not conta­in letters, e.g., raw punctuation. 3.1 Traditional word embeddings As the results using Latent Dirichlet Allocation in combination with Bag-of-Words (BoW) and TF–IDF do not add a contribution to the analysis, we employ TF–IDF as we want to see the most relevant words for each category of offensive language that we have in the data set. For each category, we take the corre­sponding tweets or comments and use them as do­cuments. We show the results in Table 1. We can see that some of the categories have similar unigrams that achieved the highest TF–IDF score. An exam­ple of categories with the same highest scored uni-grams are insult and obscene. This makes it harder to differentiate between the categories. It is important to note, that such examples might also occur due to subjective labeling in the provided data sets, as well as people not clearly differentiating between these categories. Most data sets are not labeled by experts, but with the help of platforms such as FigureEight or Amazon Mechanical Turk. From the results in Ta­ble 1, we could assume that most people perceive categories such as insult and obscene or threat and toxic similarly. On the other hand, categories such as spam or cyberbullying are clearly differentiable from other categories. We can also see a lot of categories including Trump related words (hatespeech, profa­ne, and offensive). Those categories are taken from the same data set, and we can see that such labels will contain words that are related. So the words connected to those labels might also be connected to some bigger topic since this can be influenced by the popular topics at that time, and a platform from which the creators of the data set decided to collect the data. Table 1: Table shows the five highest scoring unigrams for each label we investigate. We choose the parameters, which we believe provide us with the most meaningful unigrams, so we consider words that appear in at least 5 % and less than 60 % of the documents. category unigrams with highest TF–IDF score racism peopl, white, terror, man, look sexism feminazi, women, think, sexist, notsexist benevolent women, classi, sassi, nasti, gonna abusive know, stupid, shit, like, idiot hateful peopl, trump, nigga, like, idiot spam giveaway, game, enter, work, home cyberbullying one, guy, good, gone, go hatespeech world, trumpisatraitor, trump, shameonicc, peopl identity hate fuck, shit, littl, like, one insult delet, go, ass, stupid, bitch obscene delet, go, stupid, bitch, ass offensive trumpisatraitor, like, douchebag, fucktrump, get profane trump, shit, say, resist, peopl threat fuck, get, die, want, find toxic fuck, get, bitch, want, block 3.2 Non-contextual word embeddings For each of the category labels, we try to find the 30 most similar words and use their embed- dings to infer the similarities and differences between the su­bgroups. For this task we use pre- trained Word2Vec [Mikolov et al., 2013a, Mikolov et al., 2013b], GloVe [Pennington et al., 2014], FastText [Bojanowski et al., 2017], and ConceptNet Numberbatch [Speer et al., 2017] embeddings of dimensionality 300. We visuali­ze the results with the help of t-SNE [Van der Maaten and Hinton, 2008] (perplexity = 15, number of itera­tions = 3500, and 2 components). Because of this, we cannot interpret distances between the labels from the visualization. However, we can still infer that the Figure 2: Word2Vec and GloVe embeddings. Figure shows Word2Vec (left) and GloVe (right) embeddings of 30 closest words of each label that we analyze. Note that we omit offensive language subgroups that are not in the vocabulary. labels that are intertwined are more similar than tho­se that are nicely separable from one another. We show the results of Word2Vec and GloVe in Figure 2. Note that with this approach, the name of the category is favoured as the used words are de­rived with respect to the category name. However, the approach still uncovers various connections. We can see that homophobic and racist appear very inter­twined in Word2Vec and GloVe embeddings, mea­ning that they cannot be separated, thus indicating a strong relation. On the other hand, in both of these embeddings spam, toxic, and discredit are well sepa­rated from other groups and are clearly distingu­ishable from others. We can also see that abusive is entangled with benevolent in GloVe representation, however, in results obtained from Word2Vec benevo­lent is nicely separable from other labels. So it is dif­ficult to conclude that benevolent is a label that is dif­ferent enough from other labels. FastText also nicely separates toxic and benevolent from other labels, but is unable to separate vulgar, profane, obscene, and insult. From all three models combined, we can conclude that the only label that can be always well distingui­shed from the others is toxic, and that vulgar, profane, obscene, and insult are labels that cannot be nicely se­parated. We also conclude that spam is a nicely se­parable category. Note that in some models we omit labels that are not in a vocabulary (identity hate in all models, hate speech in GloVe, and threat and spam in FastText). By now we provide some relations and decide to further investigate the connections between the related labels using word analogy. We try to find hyponyms and hypernyms, which we do with the help of the following setting: father : son = our_label : x (hyponyms) animal : cat = our_label : x (hyponyms) son : father = our_label : x (hypernyms) cat : animal = our_label : x (hypernyms) where our_label is one of the analyzed labels and x is the word found by Word2Vec or GloVe. We look at most similar words to the vector, which we obtain by taking the difference of unit-normed vectors of the two words on the left side of the equation and ad­ding unit-normed vector of our_label. We consider cosine similarity. Unfortunately, the relationships are not clear and uniquely defined. An example is racism is to sexism what is son to father with a cosine similarity of 0.646, but sexism is to racism what is son to father with a cosine similarity of 0.648. We can once again see that the two labels are related, but the precise rela­tionship cannot be inferred. Using brother and sister the similarity is lower. This could indicate that it is impossible to find a specific hypernym and that we can only conclude that the labels are more closely re­lated, as they are each in some way hypernym and hyponym of each other. Similarly, racism and sexism are connected to homophobia and slur. Another group that we find, but also cannot clearly define the inner relations contains vulgar, profane, and obscene. As mentioned, the distances between the inspec­ted labels cannot be determined from our chosen vi-sualiza- tion. That is why we approach this problem with clustering. We use k-means (10 iterations for all experiments) and hierarchical clustering (with Ward linkage on distance matrix) in hopes of finding me­aningful clusters that could help us understand the relationships between the subgroups of the offensi­ve language better. We determine the k in k-means by using the silhouette score. The silhouette score is a useful metric that can be used to validate the go­odness of the clustering. It can take values from -1 (clusters assigned in the wrong way) to 1 (clusters are clearly distinguished). Silhouette score is also useful for determining the optimal number of clusters, and we use it for that purpose. Note that we choose the k of the second peak of the score, as we want to form more diverse and meaningful clusters than just 2 big subgroups as the silhouette score suggests. See the example output of the silhouette score in Figure 3. Silhouette score – k-means clustering 0.40 0.35 0.30 0.25 0.20 silhouette score k Figure 3: Silhouette score. Example of silhouette scores for different numbers of clusters. We use the second peak (k = 5) instead of first (k = 2), as we want to get more clusters. From the top 30 similar words for each label, we compute an average vector and we obtain one such vector for each label. We compute the cosine similarity matrix between the vectors simcos and compute the di­stance matrix as d = 1 simcos, which we then use for the clustering. In Table 2 we show the obtained clusters using k-means and in Figure 4 we show the results of hierarchical clustering of Word2Vec embeddings. From these two clustering results, we can infer that insult and obscene are two similar subgroups of hate speech as they both appear in the same cluster in k-means clustering and we can see that they are in the same subcluster of nine offensive language groups in hierarchical clustering. They are also very similar according to the results from TF–IDF as seen before. We can see that cyberbullying and spam are clustered together in both clusterings and that threat and toxic are also very similar. Comparing the hierarchical clustering results of GloVe and FastText embeddings to Word2Vec em­beddings, we can see that we always get almost the same two main clusters like those in Figure 4, so we do not show figures with those results. Looking at k-means clustering of Word2Vec and GloVe embeddings we see that labels abusive, vulgar, racist, homophobic, profane, slur, obscene, hateful, insult, and discredit, hostile always appear in the same two clusters, so we can conclude that they are related. We do not include the results of FastText k-means cluste­ring, as its silhouette score is = 0.30 for all possible k, whereas in the first two, the score is often > 0.30. We try to apply this same approach to the words with the highest TF–IDF scores from each subgroup, however, the obtained clusters provide no useful un­derstanding, so we omit those results. Additionally, we use ConceptNet Numberbatch [Speer et al., 2017] embeddings. ConceptNet Num­berbatch is a snapshot of word embeddings that have semi-structured, common sense knowledge from ConceptNet, a freely available semantic network. We apply a similar methodology as for Word2Vec, GloVe, and FastText embeddings, and show the re­sults in Figure 5 using t-SNE. We can see that some subgroups are separable from the others, such as be­nevolent, hostile, threat, homophobic, and spam. We can also separate a cluster of vulgar, obscene, and profane. Other subgroups of offensive language are mainly intertwined and inseparable. Table 2: K-means clustering of average Word2Vec embeddings of labels’ 30 nearest words. Table shows five clusters obtained with 5-means clustering. We determine k = 5 using silhouette score. cluster components 1 offensive 2 abusive, vulgar, racist, homophobic, profane, slur, harassment, obscene, hateful, insult, sexism, hate speech 3 discredit, hostile, benevolent 4 cyberbullying, spam 5 threat, toxic 3.3 Contextual word embeddings To perform analysis using contextual word embed­dings, we need to provide whole utterances to get desired embedding vectors. We evaluate three diffe­rent approaches based on BERT (Section 3.3.1, Key-BERT (Section 3.3.2) and USE (Section 3.3.3). For the plain BERT language model, we attach a category ke­yword to an utterance to get its representation. Ke­yBERT allows for automatic extraction of keywords from utterances and these represent each category. For the USE we compute average vectors from utte­rances and compare similarities between categories (such approach was not successful with BERT). 3.3.1 BERT We move on to contextual embeddings and we focus on BERT. We use the pretrained BERT base ca­sed model [Devlin et al., 2019] with 768 dimensional embeddings, and convert tweets and comments from our data set to BERT embeddings. We first append them » – This is