<!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>Irony detection in tweets: X2Check at Ironita 2018 (Short Paper)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Emanuele Di Rosa Chief Technology Officer App</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Check s.r.l. emanuele.dirosa @app</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>check.com</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Alberto Durante Research Scientist App2Check s.r.l. alberto.durante @app2check.com</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>English. In this paper we describe and show the results of the two systems that we have specifically developed to participate at Ironita 2018 for the irony detection task. We scored as the third team in the official ranking of the competition, thanks to the X2C-B system, at a distance of just 0.027 of F1 score from the best system.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In social media, the use of irony in tweets and
Facebook posts is widely spread and makes very
difficult for sentiment analysis tools to properly
automatically classify people opinion
        <xref ref-type="bibr" rid="ref10 ref11 ref2 ref3 ref4 ref6 ref8">(Herna´ndez
and Rosso, 2016)</xref>
        . The ability to detect irony with
high accuracy would bring an important
contribution in opinion mining systems and lead to many
industrial applications. For this reason, irony
detection has been largely studied in recent research
papers like
        <xref ref-type="bibr" rid="ref6">(Far´ıas et al., 2011)</xref>
        ,
        <xref ref-type="bibr" rid="ref7">(Barbieri et al.,
2014)</xref>
        ,
        <xref ref-type="bibr" rid="ref6 ref8">(Far´ıas et al., 2016)</xref>
        ,
        <xref ref-type="bibr" rid="ref9">(Freitas et al., 2014)</xref>
        .
      </p>
      <p>
        In this paper we describe and show the results
of the two systems that we have specifically
developed to participate at Ironita 2018
        <xref ref-type="bibr" rid="ref1">(Cignarella et
al., 2018)</xref>
        for the irony detection task. We scored
as the third team in the official ranking of the
competition, thanks to the X2C-B system, at a distance
of just 0.027 of F1 score from the best system.
      </p>
      <p>This paper is structured as follow: after the
introduction we present the descriptions of our two
systems submitted for the irony detection task;
then we show and discuss the results on the
official test set of the competition, finally we provide
our conclusions.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Systems description</title>
      <p>
        The dataset provided by Ironita organizers has
been split into training set (80% of the documents)
and development set (the remaining 20%). We
randomly sampled the examples for each
category, thus obtaining different sets for training/test
set, by keeping the distribution of ironic and
nonironic samples through the two sets. We submitted
two runs, as the results of the two different
systems we developed for each category, called
X2CA and X2C-B. The former has been developed on
top of the Scikit-learn library in Python language
        <xref ref-type="bibr" rid="ref5">(Pedregosa et al., 2011)</xref>
        , and the latter on top of the
WEKA library
        <xref ref-type="bibr" rid="ref4">(Frank et al., 2016)</xref>
        in JAVA
language. In both cases, input text has been cleaned
with a typical NLP pipeline, involving
punctuation (with the exclusion of question/exclamation
mark), numbers and stopwords removal. In
particular, since it is still hard to detect irony in a text,
very often also for humans, we tried to take
advantage of features trying to help triggering the
presence of irony. For instance, question and
exclamation marks, text strings representing laughs,
emoticons, mixed sentiment in the same sentence
are some of the text features that we extracted from
the text and represented with a specific explicit
marker highlighting their presence.
      </p>
      <p>
        Both the X2C-A and X2C-B unconstrained run
were trained using the SENTIPOLC 2016 Irony
training set and test set
        <xref ref-type="bibr" rid="ref2">(Barbieri et al., 2016)</xref>
        as
external source, in addition to the Ironita training
set.
The X2C-A system has been created by
applying an NLP pipeline including a vectorization of
the collection of reviews to a matrix of token
counts of bi-grams; then, the count matrix has
been transformed to a normalized tf-idf
representation (term-frequency times inverse
documentfrequency). For the training, we created an
ensemble model, more specifically a voting
ensemble, that takes into account three different
algorithms: LinearSVC (an implementation of
Support Vector Machines), Multinomial Naive Bayes
and the SGD classifier. All of them have an
implementation available in the Scikit-learn library.
The ensemble model has been the best model in
our model selection activity. In order to
properly select the best hyper-parameters, we applied a
grid search approach for each of the model in the
voting ensemble. The resulting ensemble model
showed a macro F1 score of 70.98 on our
development set and is very close to the final result on the
competition test set (shown in table ).
      </p>
      <p>LinearSVM
NB
SGD
Ensemble
In the model selection process, the two best
algorithms have been Naive Bayes Multinomial and
SMO, both using unigram features. We took into
account the F1 score on the positive labels and
the Macro-F1 in order to select the best
algorithm. As shown in Table 2, Naive Bayes
Multinomial reached a Macro F1 score 2.38% higher
on the constrained run and a 14.2% on the
unconstrained run, thus both the constrained and the
unconstrained submitted runs were produced using
this algorithm.</p>
      <p>Comparing the results in Table 2 with the ones
in Table 1, we can notice that X2C-B
unconstrained reached the highest performance on the
development set, while X2C-B constrained
obtained the lowest score.
In Table 3 we show the results of our runs on the
official test set of the competition. In accordance
with what we noticed before, comparing Table 1
and Table 2, our best run is X2C-B unconstrained,
which reached the best F1 overall on non-ironic
documents; it also ranks fifth in the overall
F1score, at a distance of 0.027 from the best system.
The performance of the X2C-A run is very similar
to the unconstrained run, obtaining a F1-score that
is only 0.002 higher than the constrained run. The
difference between the two X2C-B runs is larger
in relative terms, but is only of 0.021. We can also
see that our X2C-B-u shows the best F1 score on
the non-ironic tweets compared to all of the
systems.</p>
      <p>
        We added to this ranking also the model that
reached the first position on the Irony task at
SENTIPOLC 2016
        <xref ref-type="bibr" rid="ref2 ref3 ref4">(Di Rosa and Durante, 2016)</xref>
        .
The score of that model on this test set, called
X2C2016 in the table, reached a F1-score of just
0.432, which is lower than the baseline of this year.
This surprising result may indicate either that the
irony detection systems had a great improvement
in the past two years, or that irony detectors have
a performance that is very much dependent on the
topics treated in the training set, i.e. they are still
not so good to generalize.
4
      </p>
    </sec>
    <sec id="sec-3">
      <title>Conclusions</title>
      <p>In this paper we described the two systems that we
built and submitted for the Ironita 2018
competition for the irony detection task. The results show
that our system X2C-B scored as the third team at
a distance of just 0.027 of F1 score from the best
system.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
team
team 1
team 1
team 2
team 2
X2C-B-u
team 4
team 4
X2C-A-u
team 5
X2C-A-c
X2C-B-c
team 6
team 6
team 6
team 6
baseline-1
team 7
X2C2016
team 7
baseline-2
(IronITA) in Proceedings of the 6th evaluation
campaign of Natural Language Processing and Speech
tools for Italian (EVALITA’18).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>Alessandra Teresa Cignarella and Simona Frenda and Valerio Basile and Cristina Bosco and Viviana Patti</article-title>
          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 Table 3: Ironita 2018 official ranking</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Barbieri</surname>
          </string-name>
          and
          <article-title>Valerio Basile and Danilo Croce and Malvina Nissim and Nicole Novielli</article-title>
          and
          <string-name>
            <given-names>Viviana</given-names>
            <surname>Patti</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Overview of the Evalita 2016 SENTIment POLarity Classification Task in Proceedings of Third Italian Conference on Computational Linguistics (CLiC-it</article-title>
          <year>2016</year>
          ) &amp;
          <article-title>Fifth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian</article-title>
          .
          <source>Final Workshop (EVALITA</source>
          <year>2016</year>
          ), Napoli, Italy, December 5-
          <issue>7</issue>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Emanuele</given-names>
            <surname>Di</surname>
          </string-name>
          Rosa and
          <string-name>
            <given-names>Alberto</given-names>
            <surname>Durante</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Tweet2Check evaluation at Evalita Sentipolc 2016 in Proceedings of Third Italian Conference on Computational Linguistics (CLiC-it</article-title>
          <year>2016</year>
          ) &amp;
          <article-title>Fifth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian</article-title>
          .
          <source>Final Workshop (EVALITA</source>
          <year>2016</year>
          ), Napoli, Italy, December 5-
          <issue>7</issue>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>Eibe</given-names>
            <surname>Frank</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Mark A.</given-names>
            <surname>Hall</surname>
          </string-name>
          , and
          <string-name>
            <surname>Ian</surname>
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Witten</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>The WEKA Workbench</article-title>
          .
          <article-title>Online Appendix for ”Data Mining: Practical Machine Learning Tools</article-title>
          and Techniques”, Morgan Kaufmann, Fourth Edition,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Pedregosa</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Varoquaux</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Gramfort</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Michel</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Thirion</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Grisel</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Blondel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Prettenhofer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Weiss</surname>
          </string-name>
          , R. and
          <string-name>
            <surname>Dubourg</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Vanderplas</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Passos</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Cournapeau</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Brucher</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Perrot</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Duchesnay</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Scikit-learn: Machine Learning in</article-title>
          <source>Python in Journal of Machine Learning Research</source>
          , pp.
          <fpage>2825</fpage>
          -
          <lpage>2830</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>Far´ıas, Delia Irazu´ Herna´ndez et al</article-title>
          .
          <source>Irony Detection in Twitter: The Role of Affective Content</source>
          .
          <year>2011</year>
          .
          <source>in ACM Trans. Internet Techn</source>
          .
          <volume>16</volume>
          (
          <year>2016</year>
          ):
          <volume>19</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>19</lpage>
          :
          <fpage>24</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Barbieri</surname>
            , Francesco and
            <given-names>Horacio</given-names>
          </string-name>
          <string-name>
            <surname>Saggion</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Modelling Irony in Twitter: Feature Analysis and Evaluation</article-title>
          . in
          <string-name>
            <surname>LREC</surname>
          </string-name>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>Delia</given-names>
            <surname>Irazu</surname>
          </string-name>
          ´
          <article-title>Herna´ndez Far´ıas, Viviana Patti</article-title>
          , and
          <string-name>
            <given-names>Paolo</given-names>
            <surname>Rosso</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Irony Detection in Twitter: The Role of Affective Content</article-title>
          .
          <source>in ACM Transaction Internet Technology</source>
          <volume>16</volume>
          ,
          <issue>3</issue>
          ,
          <string-name>
            <surname>Article 19</surname>
          </string-name>
          (
          <year>July 2016</year>
          ), pp.
          <fpage>1</fpage>
          -
          <lpage>24</lpage>
          . DOI: https://doi.org/10.1145/2930663
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Freitas</surname>
            , Larissa and Vanin, Aline and Hogetop, Denise and
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Bochernitsan</surname>
          </string-name>
          , Marco and Vieira, Renata.
          <year>2014</year>
          .
          <article-title>Pathways for irony detection in tweets</article-title>
          .
          <source>in Proceedings of the ACM Symposium on Applied Computing</source>
          .
          <volume>10</volume>
          .1145/2554850.2555048.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Herna´ndez I.</surname>
          </string-name>
          , Rosso P.
          <year>2016</year>
          . Irony, Sarcasm,
          <string-name>
            <given-names>and Sentiment</given-names>
            <surname>Analysis</surname>
          </string-name>
          .
          <article-title>Chapter 7 In: Sentiment Analysis in Social Networks</article-title>
          ,
          <string-name>
            <given-names>F.A.</given-names>
            <surname>Pozzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Fersini</surname>
          </string-name>
          , E. Messina, and B.
          <string-name>
            <surname>Liu</surname>
          </string-name>
          (Eds.),
          <source>Elsevier Science and Technology</source>
          , pp.
          <fpage>113</fpage>
          -
          <lpage>128</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Sulis E.</surname>
          </string-name>
          , Herna´
          <string-name>
            <given-names>ndez I.</given-names>
            ,
            <surname>Rosso</surname>
          </string-name>
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Patti</surname>
          </string-name>
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Ruffo</surname>
          </string-name>
          <string-name>
            <surname>G.</surname>
          </string-name>
          <year>2016</year>
          .
          <article-title>Figurative Messages and Affect in Twitter: Differences Between #irony, #sarcasm and #not</article-title>
          .
          <source>In: Knowledge-Based Systems</source>
          , vol.
          <volume>108</volume>
          , pp.
          <fpage>132</fpage>
          -
          <lpage>143</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>