<!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>UNIBA - Integrating distributional semantics features in a supervised approach for detecting irony in Italian tweets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pierpaolo Basile</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Semeraro</string-name>
          <email>giovanni.semerarog@uniba.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science University of Bari Aldo Moro Via</institution>
          ,
          <addr-line>E. Orabona, 4 - 70125 Bari</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>English. This paper describes the UNIBA team participation in the IronITA 2018 task at EVALITA 2018. We propose a supervised approach based on LIBLINEAR that relies on keyword, polarity, microblogging features and representation of tweets in a distributional semantic model. Our system ranked 3rd and 4th in the irony detection subtask. We participated only in the constraint run exploiting the training data provided by the task organizers.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>The irony is defined as “the use of words that
say the opposite of what you really mean, often
as a joke and with a tone of voice that shows
this”1. This suggests us that when we are
analyzing written text for detecting irony, we should
focus our attention on those words that are used in
an unconventional context. For example, given the
tweet: “S&amp;P ha declassato Mario Monti da
Premier a Badante #declassaggi”2, we can observe
1Oxford Learner Dictionary
2In English: “S&amp;P has downgraded Mario Monti from
Premier to Caregiver”
that the word “badante” (caregiver) is used in an
unconventional context, since “caregiver” usually
does not co-occur with words “Premier” or “Mario
Monti”.</p>
      <p>
        Following this idea in our work we introduce a
feature able to detect words used out of their usual
context. Moreover, we integrate further features
based on keywords, bigrams, trigrams, polarity
and micro-blogging features as reported in
        <xref ref-type="bibr" rid="ref2">(Basile
and Novielli, 2014)</xref>
        . Our idea is supported by best
systems participating in the Semeval-2018 task 3
Irony detection in English tweets
        <xref ref-type="bibr" rid="ref10">(Van Hee et al.,
2018)</xref>
        , where the best systems not based on deep
learning exploit features based on polarity contrast
information and context incongruity.
      </p>
      <p>
        We evaluate our approach in the context of the
IronITA task at EVALITA 2018
        <xref ref-type="bibr" rid="ref3">(Cignarella et al.,
2018)</xref>
        . The goal of the task is to predict irony in
Italian tweets. The task is organized in two
subtasks: 1) irony detection and 2) different types of
irony. In the second sub-task participates must
identify if irony belongs to sarcasm or not. In this
paper, we propose an approach which is able to
detect the presence of irony without taking into
account different types of irony. We evaluate the
approach in a constrained setting using only the data
provided by task organizers. The only external
resources exploited in our approach are a polarity
lexicon and a collection of about 40M tweets
randomly extracted from TWITA
        <xref ref-type="bibr" rid="ref1">(Basile and Nissim,
2013)</xref>
        (a collection of about 800M Italian tweets).
      </p>
      <p>The paper is structured as follows: Section 2
describes our system, while evaluation and results
are reported in Section 3. Final remarks are
provided in Section 4.
2</p>
    </sec>
    <sec id="sec-2">
      <title>System Description</title>
      <p>
        Our approach adopts a supervised classifier based
on LIBLINEAR
        <xref ref-type="bibr" rid="ref6">(Fan et al., 2008)</xref>
        , in particular we
use the L2-regularized L2-loss linear SVM. Each
tweet is represented using several sets of features:
keyword-based : keyword-based features exploit
tokens occurring in the tweets. Unigrams,
bigrams and trigrams are considered. During
the tokenization we replace the user mentions
and URLs with two metatokens: “ USER ”,
“ URL ”;
microblogging : microblogging features take into
account some attributes of the tweets that
are peculiar in the context of
microblogging. We exploit the following features: the
presence of emoticons, item character
repetitions3, informal expressions of laughters4
and the presence of exclamation and
interrogative marks. All microblobbing features are
binary.
polarity : this block contains features extracted
from the SentiWordNet
        <xref ref-type="bibr" rid="ref5">(Esuli and Sebastiani,
2006)</xref>
        lexicon. We translate SentiWordNet in
Italian through MultiWordNet
        <xref ref-type="bibr" rid="ref7">(Pianta et al.,
2002)</xref>
        . It is important to underline that
SentiWordNet is a synset-based lexicon while our
Italian translation is a word based lexicon. In
order to automatically derive our Italian
sentiment lexicon from SentiWordNet, we
perform three steps. First, we translate the synset
offset in SentiWordNet from version 3.0 to
1.65 using automatically generated mapping
file. Then, we transfer the prior polarity of
SentiWordNet to the Italian lemmata.
Finally, we expand the lexicon using
Morphit!
        <xref ref-type="bibr" rid="ref11">(Zanchetta and Baroni, 2005)</xref>
        , a lexicon
of inflected forms with their lemma and
morphological features. We extend the polarity
scores of each lemma to its inflected forms.
Details about the creation of the sentiment
lexicon are reported in
        <xref ref-type="bibr" rid="ref2">(Basile and Novielli,
2014)</xref>
        . The obtained Italian translation of
SentiWordNet is used to compute three
features based on prior polarity of words in the
tweets: 1) the maximum positive polarity;
2) the maximum negative polarity; 3)
polarity variation: for each token occurring in the
tweet a tag is assigned, according to the
highest polarity score of the token in the Italian
lexicon. Tag values are in the set fOBJ, POS
, NEGg. The sentiment variation counts how
3These features usually plays the same role of intensifiers
in informal writing contexts.
      </p>
      <p>
        4i.e., sequences of “ah”.
5Since MultiWordNet is based on WordNet 1.6.
many switches from POS to NEG, or vice
versa, occur in the tweet.
distributional semantics features : we compute
two kinds of distributional semantics
features:
1. given a set of unlabelled downloaded
tweets, we build a geometric space in
which each word is represented as a
mathematical point. The similarity
between words is computed as their
closeness in the space. To represent a tweet
in the geometric space, we adopt the
superposition operator
        <xref ref-type="bibr" rid="ref9">(Smolensky, 1990)</xref>
        ,
that is the vector sum of all the vectors
of words occurring in the tweet. We use
the tweet vector !t as a semantic feature
in training our classifiers;
2. we extract three features that taking into
account the usage of words in an
unconventional context. In particular, for each
word wi we compute a score aci that
measures how the word is out of its
conventional context. Finally, we compute
three features: the average, the
maximum and the minimum of all the aci
scores. More details about the
computation of the aci score are reported in
Subsection 2.1.
2.1
      </p>
      <p>
        Distributional Semantics Features
The distributional semantics model is built on a
collection of tweets. We randomly extract 40M
tweets from TWITA and build a semantic space
based on the Random Indexing (RI)
        <xref ref-type="bibr" rid="ref8">(Sahlgren,
2005)</xref>
        technique using a context windows equals
to 2. Moreover, we consider only words occurring
more than ten times6. The context window is
dynamic and it does not take into account words that
are not in the vocabulary. Our vocabulary contains
105,543 terms.
      </p>
      <p>
        The mathematical insight behind the RI is the
projection of a high-dimensional space on a lower
dimensional one using a random matrix; this kind
of projection does not compromise distance
metrics
        <xref ref-type="bibr" rid="ref4">(Dasgupta and Gupta, 1999)</xref>
        .
      </p>
      <p>Formally, given a n m matrix A and an m
k matrix R, which contains random vectors, we
define a new n k matrix B as:</p>
      <p>An;m Rm;k = Bn;k
k &lt;&lt; m
(1)
6We call this set of words: the vocabulary.</p>
      <p>
        The new matrix B has the property to preserve
the distance between points, that is if the distance
between two any points in A is d; then the distance
dr between the corresponding points in B will
satisfy the property that dr c d. A proof of that
is reported in the Johnson-Lindenstrauss lemma
        <xref ref-type="bibr" rid="ref4">(Dasgupta and Gupta, 1999)</xref>
        .
      </p>
      <p>Specifically, RI creates the WordSpace in two
steps:
1. A context vector is assigned to each word.</p>
      <p>This vector is sparse, high-dimensional and
ternary, which means that its elements can
take values in f-1, 0, 1g. A context
vector contains a small number of randomly
distributed non-zero elements, and the structure
of this vector follows the hypothesis behind
the concept of Random Projection;
2. Context vectors are accumulated by
analyzing co-occurring words. In particular, the
semantic vector for any word is computed as
the sum of the context vectors for words that
co-occur with the analyzed word.</p>
      <p>Formally, given a corpus C of n documents, and
a vocabulary V of m words extracted from C, we
perform two steps: 1) assign a context vector ci to
each word in V ; 2) compute a semantic vector svi
for each word wi as the sum of all context vectors
assigned to words co-occurring with wi. The
context is the set of m words that precede and follow
wi.</p>
      <p>For example, considering the following tweet:
“siete il buono della scuola fatelo capire”. In the
first step we assign a random vector to each term
as follows:
csiete = ( 1; 0; 0; 1; 0; 0; 0; 0; 0; 0)
cbuono = (0; 0; 0; 1; 0; 0; 0; 1; 0; 0)
cscuola = (0; 0; 0; 0; 1; 0; 0; 0; 1; 0)
cfatelo = (0; 1; 0; 0; 0; 1; 0; 0; 0; 0)
ccapire = ( 1; 0; 0; 0; 0; 0; 0; 0; 0; 1)</p>
      <p>In the second step, we build a semantic
vector for each term by accumulating random
vectors of its co-occurring words. For example
fixing m = 2, the semantic vector for the word
scuola is the sum of the random vectors
siete, buono, fatelo, capire. Summing these
vectors, the semantic vector for scuola results in
( 1; 1; 0; 2; 0; 1; 0; 1; 0; 1). This operation is
repeated for all the sentences in the corpus and for
all the words in V . In this example, we used very
small vectors, but in a real scenario, the vector
dimension ranges from hundreds to thousands of
dimensions. In particular, in our experiment we use
a vector dimension equals to 200 with 10 no-zero
elements.</p>
      <p>In order to compute the aci score for a word wi
in a tweet, we build a context vector cwi as the sum
of random vectors assigned to words that co-occur
with wi in the tweet. Then we compare the cosine
similarity between cwi and the semantic vector svi
assigned to wi. The idea is to measure how the
semantic vector is dissimilar to the context vector.
If the word wi has never appeared in the context
under analysis, its semantic vector does not
contain the random vectors of the words in the
context, this results in low cosine similarity. Finally,
the divergence from the context is computed as
1 cosSim(cwi ; svi).
3</p>
    </sec>
    <sec id="sec-3">
      <title>Evaluation</title>
      <p>We perform the evaluation using the data provided
by the task organizers. The number of tweets in
the training set is 3,977, while the testing set
consists of 872 tweets. The only parameter to set in
LIBLINEAR is C (the cost), after a 5-fold cross
validation on training we set C=1.</p>
      <p>We submit two runs: UNIBA1 includes the
semantic vector representing the tweet as a feature,
while UNIBA2 does not include this vector.
Nevertheless, features about the divergence are
included in both the runs.</p>
      <p>Official results are reported in Table 1. Our runs
rank third and fourth in the final rank. Our team
is classified as second since the first two runs in
the rank belong to the team1. We can notice that
runs are very close in the rank. The last run is
ranked below the baseline random, while any
system is ranked below the baseline baseline-mfc that
assigns the most frequent class (non-ironic).</p>
      <p>Results show that our system is not able to
improve performance exploiting the distributional
representation of tweets, since the two runs report
the same average F1-score. We performed further
experiments in order to understand the
contribution of each feature. Some relevant outcomes are
reported in Table 2, in particular:
keyword-based features are able to achieve
the best performance, in particular bigrams
team
team1
team1
UNIBA1
UNIBA2
team3
team6
random
team7
baseline-mfc
and trigrams contribute to improve the
performance (run 1 and 2);
different kernels for distributional and
keywordbased features.</p>
      <p>DSM features introduce some kind of noise
when are combined with other features, in
fact run 4, 5 and 6 achieve good performance
without DSM;
DSM alone without any other kind of features
is able to achieve remarkable results, it is
important to notice that in this run only the tweet
vector is used as a feature;
blog, polarity, and context features are not
able to give a contribution to the overall
system performance, however we can observe
that using only context features (only three
features for each tweet) we are able to
overcome both the baselines.</p>
      <p>Analyzing results we can conclude that a more
effective way to combine distributional with
nodistributional features is needed. We plan to
investigate as a future work the combination of two
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>We propose a supervised system for detecting
irony in Italian tweets. The proposed system
exploits different kinds of features: keyword-based,
microblogging features, polarity, distributional
semantics features and a score that measure how a
word is used in an unconventional context. The
word divergence from its conventional context is
computed exploiting the distributional semantics
model build by the Random Indexing.</p>
      <p>Results prove that our system is able to achieve
good performance and rank third in the official
ranking. However, a deep study on different
combinations of features shows that keyword-based
features alone are able to achieve the best result,
while distributional features introduce noise
during the training. This outcome suggests the need
for a different strategy for combining
distributional a no-distributional features.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Valerio</given-names>
            <surname>Basile</surname>
          </string-name>
          and
          <string-name>
            <given-names>Malvina</given-names>
            <surname>Nissim</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Sentiment analysis on italian tweets</article-title>
          .
          <source>In Proc. of WASSA</source>
          <year>2013</year>
          , pages
          <fpage>100</fpage>
          -
          <lpage>107</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Pierpaolo</given-names>
            <surname>Basile</surname>
          </string-name>
          and
          <string-name>
            <given-names>Nicole</given-names>
            <surname>Novielli</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Uniba at evalita 2014-sentipolc task: Predicting tweet sentiment polarity combining micro-blogging, lexicon and semantic features</article-title>
          .
          <source>In Proc. of EVALITA</source>
          <year>2014</year>
          , pages
          <fpage>58</fpage>
          -
          <lpage>63</lpage>
          , Pisa, Italy.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Alessandra</given-names>
            <surname>Teresa</surname>
          </string-name>
          <string-name>
            <surname>Cignarella</surname>
          </string-name>
          , Simona Frenda, Valerio Basile, Cristina Bosco, Viviana Patti, and
          <string-name>
            <given-names>Paolo</given-names>
            <surname>Rosso</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Overview of the evalita 2018 task on irony detection in italian tweets (ironita)</article-title>
          .
          <source>In Tommaso Caselli</source>
          , Nicole Novielli, Viviana Patti, and Paolo Rosso, editors,
          <source>Proceedings of the 6th evaluation campaign of Natural Language Processing and Speech tools for Italian (EVALITA'18)</source>
          , Turin, Italy. CEUR.org.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>Sanjoy</given-names>
            <surname>Dasgupta</surname>
          </string-name>
          and
          <string-name>
            <given-names>Anupam</given-names>
            <surname>Gupta</surname>
          </string-name>
          .
          <year>1999</year>
          .
          <article-title>An elementary proof of the Johnson-Lindenstrauss lemma</article-title>
          .
          <source>Technical report, Technical Report TR-99-006</source>
          , International Computer Science Institute, Berkeley, California, USA.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Esuli</surname>
          </string-name>
          and
          <string-name>
            <given-names>Fabrizio</given-names>
            <surname>Sebastiani</surname>
          </string-name>
          .
          <year>2006</year>
          .
          <article-title>Sentiwordnet: A publicly available lexical resource for opinion mining</article-title>
          .
          <source>In Proc. of LREC</source>
          , pages
          <fpage>417</fpage>
          -
          <lpage>422</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Rong-En</surname>
            <given-names>Fan</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kai-Wei</surname>
            <given-names>Chang</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cho-Jui</surname>
            <given-names>Hsieh</given-names>
          </string-name>
          , XiangRui Wang, and
          <string-name>
            <surname>Chih-Jen Lin</surname>
          </string-name>
          .
          <year>2008</year>
          .
          <article-title>Liblinear: A library for large linear classification</article-title>
          .
          <source>Journal of machine learning research</source>
          ,
          <volume>9</volume>
          (Aug):
          <fpage>1871</fpage>
          -
          <lpage>1874</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>Emanuele</given-names>
            <surname>Pianta</surname>
          </string-name>
          , Luisa Bentivogli, and
          <string-name>
            <given-names>Christian</given-names>
            <surname>Girardi</surname>
          </string-name>
          .
          <year>2002</year>
          .
          <article-title>Multiwordnet: developing an aligned multilingual database</article-title>
          .
          <source>In Proc. 1st Intl Conf. on Global WordNet</source>
          , pages
          <fpage>293</fpage>
          -
          <lpage>302</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>Magnus</given-names>
            <surname>Sahlgren</surname>
          </string-name>
          .
          <year>2005</year>
          .
          <article-title>An Introduction to Random Indexing</article-title>
          .
          <source>In Methods and Applications of Semantic Indexing Workshop at the 7th International Conference on Terminology and Knowledge Engineering</source>
          , TKE, volume
          <volume>5</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <given-names>Paul</given-names>
            <surname>Smolensky</surname>
          </string-name>
          .
          <year>1990</year>
          .
          <article-title>Tensor product variable binding and the representation of symbolic structures in connectionist systems</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <volume>46</volume>
          (
          <issue>1- 2</issue>
          ):
          <fpage>159</fpage>
          -
          <lpage>216</lpage>
          , November.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Cynthia Van Hee</surname>
          </string-name>
          ,
          <string-name>
            <surname>Els Lefever</surname>
          </string-name>
          , and Ve´ronique Hoste.
          <year>2018</year>
          .
          <article-title>Semeval-2018 task 3: Irony detection in english tweets</article-title>
          .
          <source>In Proceedings of The 12th International Workshop on Semantic Evaluation</source>
          , pages
          <fpage>39</fpage>
          -
          <lpage>50</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <given-names>Eros</given-names>
            <surname>Zanchetta</surname>
          </string-name>
          and
          <string-name>
            <given-names>Marco</given-names>
            <surname>Baroni</surname>
          </string-name>
          .
          <year>2005</year>
          .
          <article-title>Morph-it!: a free corpus-based morphological resource for the italian language</article-title>
          .
          <source>Proc. of the Corpus Linguistics Conf</source>
          .
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>