<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Hate me, hate me not: Hate speech detection on Facebook</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Fabio Del Vigna</string-name>
          <email>f.delvigna@iit.cnr.it</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Cimino</string-name>
          <email>andrea.cimino@ilc.cnr.it</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Felice Dell'Orletta</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marinella Petrocchi</string-name>
          <email>m.petrocchi@iit.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maurizio Tesconi</string-name>
          <email>m.tesconi@iit.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Istituto di Informatica e Telematica, CNR</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Istituto di Linguistica Computazionale, CNR</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Pisa</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2017</year>
      </pub-date>
      <fpage>86</fpage>
      <lpage>95</lpage>
      <abstract>
        <p>While favouring communications and easing information sharing, Social Network Sites are also used to launch harmful campaigns against specific groups and individuals. Cyberbullism, incitement to self-harm practices, sexual predation are just some of the severe effects of massive online offensives. Moreover, attacks can be carried out against groups of victims and can degenerate in physical violence. In this work, we aim at containing and preventing the alarming diffusion of such hate campaigns. Using Facebook as a benchmark, we consider the textual content of comments appeared on a set of public Italian pages. We first propose a variety of hate categories to distinguish the kind of hate. Crawled comments are then annotated by up to five distinct human annotators, according to the defined taxonomy. Leveraging morpho-syntactical features, sentiment polarity and word embedding lexicons, we design and implement two classifiers for the Italian language, based on different learning algorithms: the first based on Support Vector Machines (SVM) and the second on a particular Recurrent Neural Network named Long Short Term Memory (LSTM). We test these two learning algorithms in order to verify their classification performances on the task of hate speech recognition. The results show the effectiveness of the two classification approaches tested over the first manually annotated Italian Hate Speech Corpus of social media text.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Social Network Sites (SNSs) are an ideal place for Internet users to keep in touch, share
information about their daily activities and interests, publishing and accessing documents, photos
and videos. SNSs like Facebook, Twitter, Ask.fm and Google+ give the ability to create
profiles, to have a list of peers to interact with and to post and read what others have posted. It
comes as no surprise that, overall, SNSs - together with search engines - are among the most
visited websites1.</p>
      <p>
        Unfortunately, SNSs are also the ideal plaza for proliferation of harmful information.
Cyberbullying, sexual predation [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ], self-harm practices incitement [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] are some of the effective
results of the dissemination of malicious information on SNSs. Many of these attacks are often
carried by a single individual, but they can be also managed by groups. The target of the trolls
are often selected victims but, in some circumstances, the hate can be directed towards wide
groups of individuals, discriminated for some features, like race or gender. Such campaigns may
involve a very large number of haters that are self excited by hateful discussions, and such hate
might end up with physical violence or violent actions.
      </p>
      <p>1http://www.alexa.com/topsites - All websites have been lastly accessed on October, 23, 2016.</p>
      <p>
        Work in [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] characterises the attacker and it provides a definition of trolls, i.e., online users
pretending to sincerely strive for be part of an online community, but whose real intentions are
to cause disruption and exacerbate conflict, for the purposes of their own amusement. Thus,
sexists, religious fanatics, political extremists massively use SNSs to foster hate against specific
individuals/organizations, by causing a sounding board effect, which may critically damage the
targets of the hate campaign, by using both psychological and physical violence. Although
more experienced users could be able to face threats and trolls, the great majority of them
cannot easily bear the attacks, especially minors and those who might get exposed mediatically
to public judgment. Media frequently report evidences about the (unfortunately extreme in
some cases) consequences that na¨ıve and emotive users have faced to2.
      </p>
      <p>
        This work aims at containing and preventing the alarming diffusion of massive online hate
campaigns on SNSs and it focuses on Italian texts. The issue has been tackled in the past
with different approaches, laying somehow in the middle between pre-emption and mending.
One approach aims at mitigating chat conversations through ad hoc filters, like in [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ], by
semantically detecting offensive content and removing it. The second approach operates on
published content and tries to remove the offending one, often leveraging the analysis on multiple
messages, as in [
        <xref ref-type="bibr" rid="ref3 ref36 ref7">3, 7, 36</xref>
        ].
      </p>
      <p>
        Contributions. Our aim is not censoring online content, as we mostly address its
classification for the Italian language to pinpoint anomalous waves of hate and disgust. Using Facebook
as a benchmark, we classify the content of comments appeared on a set of public pages. We
contribute along the following dimensions:
• we design and develop the first hate speech classifier for the Italian language and we
compare two different approaches based on state-of-the-art learning algorithms for sentiment
analysis tasks;
• starting from classifying the single comment on a Facebook page, the results proposed in
this paper constitute the prelude to the detection of violent discussions as a whole. This
with the ultimate goal to promptly detect waves of hate, which several users may take
part to, as it happened recently and unfortunately on Facebook pages3,4;
• we introduce a taxonomy of a variety of hate categories, expanding the classes proposed
in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] and specifically considering the subject of the hate, like, e.g., hate for religious,
racial, socio-economical reasons; while not directly employed here in the classification, the
definition of such taxonomy is a step towards more refined classification tasks.
      </p>
      <p>Next section introduces the corpus for hate speech detection. Section 3 presents our
classification techniques and reports its performance results. In Section 4, we discuss related work
on detecting textual aggressions on social media. Finally, Section 5 concludes the paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Hate Speech Corpus</title>
      <p>This section reports on the retrieval and annotation phase of our hate speech Italian corpus.</p>
      <p>2http://osservatorio-cyberbullismo.blogautore.repubblica.it/ (La Repubblica - Italian newspaper
online edition)
3https://www.facebook.com/Black-block-430370993643807/ (Facebook page)
4https://goo.gl/jYJPoZ (Il Tempo - Italian Newspaper online edition)
2.1</p>
      <sec id="sec-2-1">
        <title>Data crawling</title>
        <p>Aiming at monitoring the “hate level” across Facebook, we have built a corpus of comments
retrieved from the Facebook public pages of Italian newspapers, politicians, artists, and groups.
These pages typically host discussions spanning across a variety of topics.</p>
        <p>We have developed a versatile Facebook crawler, which exploits the Graph API5 to retrieve
the content of the comments to Facebook posts. The crawler leverages the flexibility of the
Laravel framework to deploy a wide set of features, like flexibility, code reuse, different storage
strategies and parallel processing. Implemented as a Web service, it can be controlled through a
Web interface or using a cURL command6. The tool requires a set of registered application keys
and some target pages to crawl. It is capable of storing data in the filesystem either as JSON7
files, or in Kafka8 queues or in Elasticsearch9 indexes. According to the number of application
keys provided to the application, it is able to crawl multiple pages in parallel. Starting from the
most recent post, the crawler collects all the information related to the posts, up to comments
to comments. For the sake of simplicity, in this work we have however limited our analysis to
direct comments to the posts.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Data annotation</title>
        <p>The crawler was used to collect comments related to a series of web pages and groups, chosen
since we suspected to possibly contain hate content.</p>
        <p>Title of Facebook page
salviniofficial
matteorenziufficiale
lazanzarar24
jenusdinazareth
sinistracazzateliberta2
ilfattoquotidiano
emosocazzi
noiconsalviniufficiale</p>
        <p>Annotated posts
19
2
10
2
7
11</p>
        <p>4
14</p>
        <p>
          Given that the majority of comments has been annotated by more than one annotator, we
have also computed the Fleiss’ kappa κ inter-annotator agreement metric [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ], which measures
the level of agreement of different annotators on a task. The level of agreement among
annotators conveys the level of the difficulty of a task. In our case, considering the 1,687 comments
that received annotations from all the 5 annotators, we obtain κ = 0.19 when discriminating
over three hate classes, while κ = 0.26 over two classes (where Strong Hate and Weak Hate have
been merged together). Such low κ values testify that the annotation task was really hard for
our students.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Text Classification</title>
      <p>This section describes the classification approaches and gives their results. On the annotated
dataset, we compute a series of features, described in detail in the following. A series of lexicons
used to derive part of the features is described in Section 3.1.1. Comments in our dataset are
then represented as a vector of features, given as input to the classifier, along with the result
of the annotation. In the training phase, the classifier learns to classify a comment according
to the values of its features and the annotation result. In the test phase, the classifier takes
decision and tags comments as expressing hatred or not, according to the learned model.
3.1</p>
      <sec id="sec-3-1">
        <title>The classifier</title>
        <p>
          We tested two different classifiers based on different learning algorithms: the first one based on
Support Vector Machines (SVM) and the second one on a particular Recurrent Neural Network
named Long Short Term Memory (LSTM). While SVM is an extremely strong performer, hardly
to be transcended, unfortunately these types of algorithms capture “sparse” and “discrete”
features in document classification tasks. This makes the detection of relations in sentences really
hard, while this is often the key factor in detecting the overall sentiment polarity of a
document [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ]. On the contrary, LSTM networks are a specialization of Recurrent Neural Networks
(RNN), which are able to capture long-term dependencies in a sentence. This type of neural
network has been recently tested on sentiment analysis tasks [
          <xref ref-type="bibr" rid="ref33 ref37">33, 37</xref>
          ], reaching outperforming
classification performance [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ], with even a 3-4 points improvement with respect to commonly
used learning algorithms. In this work, we use the Keras [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] deep learning framework and
LIBSVM [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] to generate, respectively, the LSTM and the SVM statistical models. Since our
approach relies on morpho-syntactically tagged texts, the hate speech corpus was automatically
morpho-syntactically tagged by the Part-Of-Speech tagger described in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
3.1.1
        </p>
        <sec id="sec-3-1-1">
          <title>Lexical resources</title>
          <p>
            To improve the overall accuracy of our system, we used both sentiment polarity and word
embedding lexicons. Sentiment polarity lexicons10 were already successfully tested for the
classification of positive, negative and neutral sentiment of Italian social media posts [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ]. We
used the ones described in [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ] which include a manually created lexicon for Italian [
            <xref ref-type="bibr" rid="ref35">35</xref>
            ], two
automatically translated sentiment polarity lexicons originally created for English [
            <xref ref-type="bibr" rid="ref23 ref35">23, 35</xref>
            ], an
automatically created Twitter sentiment polarity lexicon and two word similarity lexicons
automatically created using word2vec11 [
            <xref ref-type="bibr" rid="ref28">28</xref>
            ], starting from two Italian corpora: (i) PAISA` [
            <xref ref-type="bibr" rid="ref26">26</xref>
            ], a
10We downloaded the lexicons from www.italianlp.it
11http://code.google.com/p/word2vec/
large corpus of authentic contemporary Italian texts; and (ii) a lemmatized corpus of 1,200,000
tweets, automatically collected.
          </p>
          <p>In addition to these resources, we created two Word Embedding lexicons, to overcome the
issue that lexical information in a short text can be very sparse. For this purpose, we trained
two predict models using word2vec. These models learn lower-dimensional word embeddings.
Embeddings are represented by a set of latent (hidden) variables and each word is a
multidimensional vector that represent a specific instantiation of these variables. The first lexicon was built
using a tokenized version of the itWaC corpus12. The itWaC corpus is a 2 billion word corpus
constructed from the Web, limiting the crawl to the .it domain and using medium-frequency
words from La Repubblica corpus and basic Italian vocabulary lists as seeds. The second lexicon
was built from a tokenized corpus of tweets. This corpus was collected using the Twitter APIs
and it is made up of 10,700,781 Italian tweets.
3.1.2</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>The SVM classifier</title>
          <p>
            The SVM classifier exploits a wide set of features, ranging across different levels of linguistic
description. With the exception of the word embedding combination, these features have been
already used in sentiment polarity classification tasks [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ] showing their effectiveness. The
features are organised into three main categories: raw and lexical text features, morpho-syntactic
and syntactic features, and lexicon features.
          </p>
          <p>Raw and Lexical Text Features. Number of tokens: number of tokens occurring in the
analyzed text; Character n-grams: presence or absence of contiguous sequences of characters
in the analyzed text. Word n-grams: presence or absence of contiguous sequences of tokens
in the analyzed text. Lemma n-grams: presence or absence of contiguous sequences of lemma
occurring in the analyzed text. Repetition of n-grams chars: presence or absence of contiguous
repetition of characters in the analyzed text. Punctuation: checks whether the analyzed text
finishes with one of the following punctuation characters: “?”, “!”.</p>
          <p>Morpho-syntactic and Syntactic Features. Coarse grained Part-Of-Speech n-grams:
presence or absence of contiguous sequences of coarsegrained PoS, corresponding to the main
grammatical categories (noun, verb, adjective). Coarse grained Part-Of-Speech distribution: the
distribution of nouns, adjectives, adverbs, numbers in the text. Fine grained Part-Of-Speech
n-grams: presence or absence of contiguous sequences of fine-grained PoS, which represents
subdivisions of the coarse-grained tags (e.g., the class of nouns is subdividefalice d into proper
vs common nouns, verbs into main verbs, gerund forms, past particles). Dependency types
n-grams: presence or absence of sequences of dependency types in the analyzed text. The
dependencies are calculated with respect to i) the hierarchical parse tree structure and ii) the
surface linear ordering of words Lexical Dependency n-grams: presence or absence of sequences
of lemmas calculated with respect to the hierarchical parse tree. Lexical Dependency Triplet
n-grams: distribution of lexical dependency triplets, where a triplet represents a dependency
relation as (ld, lh, t), where ld is the lemma of the dependent, lh is the lemma of the syntactic
head and t is the relation type linking the two. Coarse Grained Part-Of-Speech Dependency
n-grams: presence or absence of sequences of coarse-grained Part-of-Speech, calculated with
respect to the hierarchical parse tree. Coarse Grained Part-Of-Speech Dependency Triplet
ngrams: distribution of coarse-grained Part-of-Speech dependency triplets, where a triplet
represents a dependency relation as (cd, ch, t), where cd is the coarse-grained Part-of-Speech of the
dependent, h is the coarse-grained Part-of-Speech of the syntactic head and t is the relation
type linking the two.</p>
          <p>Lexicon features. Lemma sentiment polarity n-grams: for each n-gram of lemmas extracted
from the analyzed text, the feature checks the polarity of each component lemma in the existing
sentiment polarity lexicons. Lemmas that are not present are marked with the ABSENT tag.
This is for example the case of the trigram “tutto molto bello” (all very nice) that is marked
as “ABSENT -POS -POS ” because molto and bello are marked as positive in the considered
polarity lexicon and tutto is absent. The feature is computed for each existing sentiment polarity
lexicons. Emoticons: presence or absence of positive or negative emoticons in the analyzed text.
The lexicon of emoticons was extracted from http://it.wikipedia.org/wiki/Emoticon and
manually classified. Polarity modifier: for each lemma in the text occurring in the sentiment
polarity lexicons, the feature checks the presence of adjectives or adverbs in a left context
window of size two. If this is the case, the polarity of the lemma is assigned to the modifier. This
is for example the case of the bigram “non interessante” (not interesting ), where “interessante”
is a positive word, and “non” is an adverb. Accordingly, the feature “non POS” is created. The
feature is computed 3 times, checking all the existing sentiment polarity lexicons. PMI score: for
each set of unigrams, bigrams, trigrams, four-grams and five-grams that occur in the analyzed
text, the feature computes the score given by Pi–gram∈text score(i–gram) and it returns the
minimum and the maximum values of the five values (approximated to the nearest integer).
Distribution of sentiment polarity: this feature computes the percentage of positive, negative
and neutral lemmas that occur in the text. To overcome the sparsity problem, the percentages
are rounded to the nearest multiple of 5. The feature is computed for each existing lexicon.
Most frequent sentiment polarity: the feature returns the most frequent sentiment polarity of
the lemmas in the analyzed text. The feature is computed for each existing lexicon. Sentiment
polarity in text sections: the feature first splits the text in three equal sections. For each section,
the most frequent polarity is computed using the available sentiment polarity lexicons. The
purpose of this feature is identifying changes of polarity within the same text. Word embeddings
combination: the feature returns the vectors obtained by computing separately the average of
the word embeddings of the nouns, adjectives and verbs of the text. It has been computed once
for each word embedding lexicon.
3.1.3</p>
        </sec>
        <sec id="sec-3-1-3">
          <title>The LSTM classifier</title>
          <p>
            The LSTM unit was initially proposed by Hochreiter and Schmidhuber [
            <xref ref-type="bibr" rid="ref22">22</xref>
            ]. LSTM units are
able to propagate an important feature that came early in the input sequence over a long
distance, thus capturing potential long-distance dependencies. LSTM is a state-of-the-art
performer for semantic composition and it allows to compute the representation of a document
from the representation of its words, with multiple abstraction levels. Each word is represented
by a low dimensional, continuous and real-valued vector.
          </p>
          <p>
            We employed a bidirectional LSTM architecture since it allows to capture long-range
dependencies from both the directions of a document by constructing bidirectional links in the
network [
            <xref ref-type="bibr" rid="ref31">31</xref>
            ]. In addition, we applied a dropout factor to both the input gates and to the
recurrent connections in order to prevent overfitting which is a typical issue of neural networks [
            <xref ref-type="bibr" rid="ref17">17</xref>
            ].
As suggested in [
            <xref ref-type="bibr" rid="ref17">17</xref>
            ], we have chosen a dropout factor value in the optimum range [0.3, 0.5], more
specifically 0.45 for this work. Concerning the optimization process, categorical cross-entropy
is used as a loss function and optimization was performed by the rmsprop optimizer [
            <xref ref-type="bibr" rid="ref34">34</xref>
            ].
          </p>
          <p>To train the LSTM architecture, each input word in the text is represented by a
262dimensional vector which is composed by:
Word embeddings: the concatenation of the two word embeddings extracted by the two available
Word Embedding lexicons (128 components for each word embedding, thus resulting in a total
of 256 components), and for each word embedding an extra component was added in order
to handle the ”unknown word”. Word polarity: the corresponding word polarity obtained
by exploiting the Sentiment Polarity lexicons. This feature adds 3 extra components in the
resulting vector, one for each possible outcome in the lexicons (negative, neutral, positive). We
assumed that a word not found in the lexicons has a neutral polarity. End of Sentence: a
component indicating whether or not the sentence was totally read.
3.2</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Experiments and Results</title>
        <p>We conducted two different classification experiments: the first considering the three different
category of hate (Strong hate, Weak hate and No hate) the second considering only two
categories, No hate and Hate, where the last category was obtained by merging the Strong hate and
Weak hate classes.</p>
        <p>For the experiments, we used only documents that were annotated at least by three different
annotators and where the most annotated class exists. This process resulted in two datasets:
the three-class dataset, composed by 3,356 documents - divided into 2,816 No hate, 410 Weak
hate and 130 Strong hate documents, and the two-class dataset, composed by 3,575 documents
- divided into 2,789 No hate and 786 Hate. To balance the datasets, we selected a subset of the
No hate texts, which was limited to the double size of the documents belonging to the Weak
hate class in the three-class experiment and to the double size of the Hate class in the two-class
one. To evaluate the accuracy of the two hate speech classifiers in the two experiments, we
followed a 10-fold cross validation process: each dataset was randomly split in ten different non
overlapping training and test sets. The overall Accuracy, Precision, Recall and F-score for each
class were calculated as the average of the these values over all the ten test sets. Accuracy,
Precision, Recall and F-score are evaluation metrics employed in standard classification tasks.
In our scenario: Accuracy measures how many comments are correctly identified in the classes;
Precision measures how many comments, among those classified as expressing hate, have been
correctly identified; Recall expresses how many comments, in the whole set, have been correctly
recognized: a low recall means that many relevant comments are left unidentified and F-score
is the armonic mean of Precision and Recall.</p>
        <p>Table 2 reports the results for the three-class experiment. Both SVM and LSTM are not
able to discriminate between the three classes and this is particularly true for the Strong hate
one. These results may be due to the small number of Strong hate documents (that is the class
with the lowest number of documents) and the low level of annotator agreement. These results
lead us to conduct the two-class experiment, whose accuracies are in Table 3. As we expected,
the results are much more higher than those in the previous experiment. This is probably due
to the higher number of Hate documents with respect to the Strong e Weak classes and to the
higher annotator agreement with respect to the three-class experiments.</p>
        <p>
          To evaluate the impact of the annotator agreement in the classification performances, we
performed a last experiment, where we selected the documents for which at least 70% of the
annotators were in agreement (321 Hate and 642 No-Hate documents). As Table 3 shows,
the more agreement yields an increasing accuracy for both the classification algorithms. This
improvement is particularly significant for the classification of the Hate class, with F-score of
about 72%. These results pave the way to the employment of our system in a real-use context.
In addition, the outcome shows that this Hate Speech corpus, filtered with respect to the
annotator agreement, allows to build automatic hate speech classifiers able to achieve accuracy
in line with the ones obtained in mostly investigated sentiment analysis tasks for Italian, such
as subjectivity and polarity classification [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>
          Classifier
SVM
LSTM
Here, we briefly revise academic work on trolls and hate speech detection. Interestingly, the
connections between the users profiles on SNSs are often strictly related to the connections in
their real life [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. Using machine learning, it was possible to recognize those users that adopt
troll profiles in cyberbullying practices [
          <xref ref-type="bibr" rid="ref13 ref18 ref4">4, 13, 18</xref>
          ]. Similarly, text analysis approaches have been
used to link together the contents of anonymous users among different opinion websites [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
Relationships based on profile connections and behaviors have been exploited to effectively
identify fake Facebook profiles [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], while lightweight profile features succeeded in recognising
fake Twitter followers [
          <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
          ]. Regarding text classification for automatic hate speech detection,
a seminal work is in [
          <xref ref-type="bibr" rid="ref32">32</xref>
          ]. In [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ], the authors propose a rule-based classifier to distinguish
between legitimate and abusive information in texts. PALADIN [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ] is a pattern mining tool to
mine patterns of language, to detect anti-social behaviors of users. The authors of [
          <xref ref-type="bibr" rid="ref36">36</xref>
          ] focus on
Twitter and propose a semi-supervised approach and statistical topic modeling for the detection
of offensive content, while work in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] presents a supervised machine learning text classifier,
trained and tested to distinguish between hateful and antagonistic responses, with a focus on
race, ethnicity and religion. Work in [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] adopts neural language models to learn distributed
low-dimensional representations of comments. The approach generates text embeddings that
can be used to feed a classifier. The authors of in [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] describe the distinction among flame
and hate speech (the latter being more directed to groups, rather than individuals). The same
work proposes the three level hate classification adopted in this paper (partially suffering for
the low IAA too). Some studies concentrate on the users’ behaviour. Authors of [
          <xref ref-type="bibr" rid="ref30">30</xref>
          ] propose
a reputation system, which tracks reputation of users using positive and negative opinions. A
behavioral analysis of banned users is in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], showing a certain degree of similarity in their texts,
containing often irrelevant content too.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>This paper introduced the first hate speech classifier for Italian texts. Considering a binary
classification, the classifier achieved results comparable with those obtained in mostly
investigated sentiment analysis tasks for Italian. Encouraged by such promising outcome, we leave
for future work the refinement of the classifier results when considering distinction (i) among
hate levels (whereas the current classifier fails to achieve satisfactory results) and (ii) among
different types of hate (which we defined in the paper and worked with at the annotation level).
We will carry out a thorough analysis of the results of the two classifiers to investigate whether
they can be combined in order to increase the performance. In addition, we are enlarging the
annotation process, both to increase the corpus size and to collect more annotations for a single
comment. We are testing new annotation methods, evaluating the inter-annotator agreement
for validating the annotation on the different degrees of hate. Besides, we will investigate the
effect of sarcasm on the classifier performance. From the classification of single comments, the
hate classifier may evolve to detect bursts of hate, thus preventing that virtual discussions give
rise to severe injures to people and assets. Given that human moderators cannot monitor the
huge user generated texts on social networks, we believe this work represents the basis to track
divergent states of Italian texts in online conversations.</p>
      <p>Acknowledgements. The authors would like to thank Salvatore Bellomo and Serena Tardelli for
their actionable support.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Mishari</given-names>
            <surname>Almishari</surname>
          </string-name>
          and
          <string-name>
            <given-names>Gene</given-names>
            <surname>Tsudik</surname>
          </string-name>
          .
          <article-title>Exploring linkability of user reviews</article-title>
          .
          <source>In ESORICS</source>
          , pages
          <fpage>307</fpage>
          -
          <lpage>324</lpage>
          . Springer Berlin Heidelberg,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Valerio</given-names>
            <surname>Basile</surname>
          </string-name>
          , Andrea Bolioli, Malvina Nissim, Viviana Patti, and
          <string-name>
            <given-names>Paolo</given-names>
            <surname>Rosso</surname>
          </string-name>
          .
          <article-title>Overview of the Evalita 2014 sentiment polarity classification task</article-title>
          .
          <source>In EVALITA</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Peter</given-names>
            <surname>Burnap</surname>
          </string-name>
          and
          <article-title>Matthew Leighton Williams</article-title>
          .
          <article-title>Hate speech, machine classification and statistical modelling of information flows on Twitter</article-title>
          .
          <source>In Internet, Policy and Politics</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Erik</given-names>
            <surname>Cambria</surname>
          </string-name>
          et al.
          <article-title>Do not feel the trolls</article-title>
          .
          <source>In Semantic Web</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Chih-Chung Chang</surname>
          </string-name>
          and
          <string-name>
            <surname>Chih-Jen Lin</surname>
          </string-name>
          .
          <article-title>LIBSVM: A library for support vector machines</article-title>
          .
          <source>ACM Transactions on Intelligent Systems and Technology</source>
          ,
          <volume>2</volume>
          :
          <issue>27</issue>
          :
          <fpage>1</fpage>
          -
          <lpage>27</lpage>
          :
          <fpage>27</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Chattopadhyay</surname>
          </string-name>
          et al.
          <article-title>Suicidal risk evaluation using a similarity-based classifier</article-title>
          .
          <source>In Advanced Data Mining and Applications</source>
          , pages
          <fpage>51</fpage>
          -
          <lpage>61</lpage>
          . Springer Berlin Heidelberg,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Justin</surname>
            <given-names>Cheng</given-names>
          </string-name>
          , Cristian
          <string-name>
            <surname>Danescu-Niculescu-Mizil</surname>
            , and
            <given-names>Jure</given-names>
          </string-name>
          <string-name>
            <surname>Leskovec</surname>
          </string-name>
          .
          <article-title>Antisocial behavior in online discussion communities</article-title>
          .
          <source>arXiv preprint arXiv:1504.00680</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8] Franc¸ois Chollet. Keras. https://github.com/fchollet/keras,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Cimino</surname>
          </string-name>
          , Stefano Cresci,
          <article-title>Felice Dell'Orletta, and</article-title>
          <string-name>
            <surname>Maurizio. Tesconi.</surname>
          </string-name>
          <article-title>Linguisticallymotivated and lexicon features for sentiment analysis of italian tweets</article-title>
          .
          <source>In EVALITA</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Mauro</surname>
            <given-names>Conti</given-names>
          </string-name>
          , Radha Poovendran, and Marco Secchiero.
          <article-title>FakeBook: Detecting fake profiles in on-line social networks</article-title>
          .
          <source>In Social Networks Analysis and Mining</source>
          , pages
          <fpage>1071</fpage>
          -
          <lpage>1078</lpage>
          . IEEE,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Stefano</surname>
            <given-names>Cresci</given-names>
          </string-name>
          , Roberto Di Pietro, Marinella Petrocchi, Angelo Spognardi, and
          <string-name>
            <given-names>Maurizio</given-names>
            <surname>Tesconi</surname>
          </string-name>
          .
          <article-title>A criticism to society (as seen by twitter analytics)</article-title>
          .
          <source>In ICDCS Workshops</source>
          , pages
          <fpage>194</fpage>
          -
          <lpage>200</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Stefano</surname>
            <given-names>Cresci</given-names>
          </string-name>
          , Roberto Di Pietro, Marinella Petrocchi, Angelo Spognardi, and
          <string-name>
            <given-names>Maurizio</given-names>
            <surname>Tesconi</surname>
          </string-name>
          .
          <article-title>Fame for sale: Efficient detection of fake twitter followers. Decision Support Sys</article-title>
          .,
          <volume>80</volume>
          :
          <fpage>56</fpage>
          -
          <lpage>71</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>Maral</given-names>
            <surname>Dadvar</surname>
          </string-name>
          et al.
          <article-title>Improving cyberbullying detection with user context</article-title>
          .
          <source>In Advances in Information Retrieval</source>
          , pages
          <fpage>693</fpage>
          -
          <lpage>696</lpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Felice</given-names>
            <surname>Dell'Orletta.</surname>
          </string-name>
          <article-title>Ensemble system for part-of-speech tagging</article-title>
          .
          <source>Proceedings of EVALITA</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Nemanja</given-names>
            <surname>Djuric</surname>
          </string-name>
          et al.
          <article-title>Hate speech detection with comment embeddings</article-title>
          .
          <source>In 24th International Conference on World Wide Web</source>
          , pages
          <fpage>29</fpage>
          -
          <lpage>30</lpage>
          . ACM,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Nicole</surname>
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Ellison</surname>
          </string-name>
          and
          <string-name>
            <surname>Danah M. Boyd</surname>
          </string-name>
          .
          <article-title>Sociality through social network sites</article-title>
          .
          <source>In The Oxford Handbook of Internet Studies. Oxford Handbooks Online</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Yarin</given-names>
            <surname>Gal</surname>
          </string-name>
          .
          <article-title>A theoretically grounded application of dropout in recurrent neural networks</article-title>
          .
          <source>arXiv preprint arXiv:1512.05287</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Patxi</surname>
            <given-names>Gala´</given-names>
          </string-name>
          <article-title>n-Garc´ıa et al. Supervised machine learning for the detection of troll profiles in Twitter social network</article-title>
          .
          <source>In Joint Conf. Soco-Cisis-Iceute</source>
          , pages
          <fpage>419</fpage>
          -
          <lpage>428</lpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>Njagi</given-names>
            <surname>Dennis</surname>
          </string-name>
          Gitari et al.
          <article-title>A lexicon-based approach for hate speech detection</article-title>
          .
          <source>Multimedia and Ubiquitous Engineering</source>
          ,
          <volume>10</volume>
          (
          <issue>4</issue>
          ):
          <fpage>215</fpage>
          -
          <lpage>230</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Kilem</surname>
            <given-names>L</given-names>
          </string-name>
          <string-name>
            <surname>Gwet</surname>
          </string-name>
          .
          <article-title>Handbook of inter-rater reliability: The definitive guide to measuring the extent of agreement among raters</article-title>
          .
          <source>Advanced Analytics</source>
          ,
          <string-name>
            <surname>LLC</surname>
          </string-name>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>Claire</given-names>
            <surname>Hardaker</surname>
          </string-name>
          .
          <article-title>Trolling in asynchronous computer-mediated communication: From user discussions to academic definitions</article-title>
          .
          <source>Politeness Research</source>
          ,
          <volume>6</volume>
          (
          <issue>2</issue>
          ):
          <fpage>215</fpage>
          -
          <lpage>242</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>Sepp</given-names>
            <surname>Hochreiter</surname>
          </string-name>
          and
          <article-title>Ju¨rgen Schmidhuber. Long short-term memory</article-title>
          .
          <source>Neural computation</source>
          ,
          <volume>9</volume>
          (
          <issue>8</issue>
          ):
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>Minqing</given-names>
            <surname>Hu</surname>
          </string-name>
          and
          <string-name>
            <given-names>Bing</given-names>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>Mining and summarizing customer reviews</article-title>
          .
          <source>In Knowledge discovery and data mining</source>
          , pages
          <fpage>168</fpage>
          -
          <lpage>177</lpage>
          . ACM,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <surname>Ralf</surname>
            <given-names>Klamma</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Marc</given-names>
            <surname>Spaniol</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Dimitar</given-names>
            <surname>Denev</surname>
          </string-name>
          .
          <article-title>Paladin: A pattern based approach to knowledge discovery in digital social networks</article-title>
          .
          <source>In I-KNOW</source>
          , volume
          <volume>6</volume>
          , pages
          <fpage>6</fpage>
          -
          <lpage>8</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>April</given-names>
            <surname>Kontostathis</surname>
          </string-name>
          .
          <article-title>Chatcoder: Toward the tracking and categorization of internet predators</article-title>
          .
          <source>In Text Mining Workshop of Siam Data Mining (SDM)</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>Verena</surname>
            <given-names>Lyding</given-names>
          </string-name>
          , Egon Stemle, Claudia Borghetti, Marco Brunello, Sara Castagnoli, Felice Dell'Orletta, Henrik Dittmann, Alessandro Lenci, and
          <string-name>
            <given-names>Vito</given-names>
            <surname>Pirrelli</surname>
          </string-name>
          .
          <article-title>The PAISA corpus of Italian web texts</article-title>
          .
          <source>In Web as Corpus Workshop (WaC-9)</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Altaf</surname>
            <given-names>Mahmud</given-names>
          </string-name>
          , Kazi Zubair Ahmed, and
          <string-name>
            <given-names>Mumit</given-names>
            <surname>Khan</surname>
          </string-name>
          .
          <article-title>Detecting flames and insults in text</article-title>
          .
          <source>In Natural Language Processing</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <surname>Tomas</surname>
            <given-names>Mikolov</given-names>
          </string-name>
          , Kai Chen, Greg Corrado, and
          <string-name>
            <given-names>Jeffrey</given-names>
            <surname>Dean</surname>
          </string-name>
          .
          <article-title>Efficient estimation of word representations in vector space</article-title>
          .
          <source>arXiv preprint arXiv:1301.3781</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>Preslav</given-names>
            <surname>Nakov</surname>
          </string-name>
          et al. Semeval
          <article-title>-2016 task 4: Sentiment analysis in Twitter</article-title>
          .
          <source>In SemEval@NAACLHLT</source>
          <year>2016</year>
          , pages
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>F Javier</given-names>
            <surname>Ortega</surname>
          </string-name>
          .
          <article-title>Detection of dishonest behaviors in on-line networks using graph-based ranking techniques</article-title>
          .
          <source>AI Communications</source>
          ,
          <volume>26</volume>
          (
          <issue>3</issue>
          ):
          <fpage>327</fpage>
          -
          <lpage>329</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>Mike</given-names>
            <surname>Schuster</surname>
          </string-name>
          and
          <article-title>Kuldip K Paliwal. Bidirectional recurrent neural networks</article-title>
          .
          <source>IEEE Transactions on Signal Processing</source>
          ,
          <volume>45</volume>
          (
          <issue>11</issue>
          ):
          <fpage>2673</fpage>
          -
          <lpage>2681</lpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>Ellen</given-names>
            <surname>Spertus</surname>
          </string-name>
          . Smokey:
          <article-title>Automatic recognition of hostile messages</article-title>
          .
          <source>In AAAI/IAAI</source>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>Duyu</given-names>
            <surname>Tang</surname>
          </string-name>
          et al.
          <article-title>Document modeling with gated recurrent neural network for sentiment classification</article-title>
          .
          <source>In Empirical Methods in Natural Language Processing</source>
          , pages
          <fpage>1422</fpage>
          -
          <lpage>1432</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>T.</given-names>
            <surname>Tieleman</surname>
          </string-name>
          and G.
          <source>Hinton. Lecture 6</source>
          .5
          <article-title>-RmsProp: Divide the gradient by a running average of its recent magnitude</article-title>
          .
          <source>COURSERA: Neural Networks for Machine Learning</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [35]
          <string-name>
            <surname>Theresa</surname>
            <given-names>Wilson</given-names>
          </string-name>
          , Janyce Wiebe, and
          <string-name>
            <given-names>Paul</given-names>
            <surname>Hoffmann</surname>
          </string-name>
          .
          <article-title>Recognizing contextual polarity in phraselevel sentiment analysis</article-title>
          .
          <source>In HLT/EMNLP</source>
          , pages
          <fpage>347</fpage>
          -
          <lpage>354</lpage>
          . ACL,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [36]
          <string-name>
            <given-names>Guang</given-names>
            <surname>Xiang</surname>
          </string-name>
          et al.
          <article-title>Detecting offensive tweets via topical feature discovery over a large scale Twitter corpus</article-title>
          .
          <source>In Information and Knowledge Management</source>
          , pages
          <fpage>1980</fpage>
          -
          <lpage>1984</lpage>
          . ACM,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          [37]
          <string-name>
            <given-names>XingYi</given-names>
            <surname>Xu</surname>
          </string-name>
          et al. UNIMELB at SemEval
          <article-title>-2016 tasks 4a and 4b: An ensemble of neural networks and a Word2Vec based model for sentiment classification</article-title>
          .
          <source>In SemEval</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          [38]
          <string-name>
            <given-names>Zhi</given-names>
            <surname>Xu</surname>
          </string-name>
          and
          <string-name>
            <given-names>Sencun</given-names>
            <surname>Zhu</surname>
          </string-name>
          .
          <article-title>Filtering offensive language in online communities using grammatical relations</article-title>
          .
          <source>In Collaboration, Electronic Messaging, Anti-Abuse and Spam</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>