<!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>An embedding-based approach for irony detection in Arabic tweets?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Leila Moudjari</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Karima Akli-Astouati</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Science and Technology Houari Boumediene, Research in Intelligent Computing, Mathematics and Applications, RIIMA laboratory</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>People write on a wide range of topics. Sometimes they express their disagreement in a sentence using sarcasm or irony. Irony represents an interesting way for opinion communication towards a particular target in social media. Therefore, it a ects the opinion analysis. In this paper, we present our results for the IDAT2019 Task: Irony Detection in Arabic Tweets. For this task, labeled data of Arabic tweets was shared. We summarize the methods, resources, and tools used with a focus on the techniques and resources that gave better results during tests.</p>
      </abstract>
      <kwd-group>
        <kwd>irony detection machine learning feature selection classi cation cnn</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>In order to capture the irony expressed in a text we explore the embedding. A
semantic layer which can provide more information about the context. Therefore,
in this section we present some related work to irony detection and models of
embedding.
2.1</p>
      <sec id="sec-2-1">
        <title>Irony detection</title>
        <p>
          In recent years, several approaches have been proposed to deal with irony
detection in social media ([
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]).
        </p>
        <p>
          Irony detection has been treated as a problem of classication, where classi ers
such as decision trees and support vector machine (SVM) give the best results
([
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]).
        </p>
        <p>
          Regarding Arabic, the attempts in which irony has been addressed in
literature are fewer. According to [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], there are no automatic approaches to detect
irony.
        </p>
        <p>
          In [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], the authors manually analyzed the similarities and di erences
between ironic expressions in English and Arabic. They used data from books,
articles and Internet.
        </p>
        <p>
          Karoui and al. in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] used multiple features such as surface, sentiment, false
assertion and exaggeration to infer the context needed to detect irony in Arabic
social media texts.
        </p>
        <p>Such works encourage the idea to explore sentiment analysis approaches and
apply them to irony detection.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Embedding</title>
        <p>Embedding provide a dense representation of the entity (words, characters,
subwords) and their relative meanings.</p>
        <p>Embeddings can be learned from text data and reused among machine
learning algorithms. They can also be learned as part of tting a neural network on
text data.</p>
        <p>
          While the point of network training is to learn good parameters, word vector
representations follow the notion that similar words are closer to each other [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
        <p>
          There are many models o ered for learning word embedding from raw text.
Among these are GloVe [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] and dependency-based word embedding [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The
well-known and widely used word2vec model introduced by Mikolov in 2013 at
Google ([
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]) was chosen for use.
        </p>
        <p>Word2vec describes two architectures for computing continuous vectors
representations, the skip-gram (SG) and Continuous Bag-Of-Words (CBOW). The
former predicts the context-words from a given source word, while the latter
performs the opposite and predicts a word according to its context window.</p>
        <p>Embedding has shown their strengths in other classi cation tasks such as
sentiment analysis. Therefore, we decided to apply it to the irony detection
task, since we need to classify a text as ironic or non-ironic.</p>
        <p>Our test showed that the CBOW model performs a little better compared to
the SG model.</p>
        <p>In the next section, we describe our models and the data used.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Methodology</title>
      <p>The detection of irony is a di cult task that is complicated by the complexity
of the Arabic text. In this section we describe the methodology we followed to
resolve the problem that is raised. We rst start by describing the data used to
train and test the models.
3.1</p>
      <sec id="sec-3-1">
        <title>Data</title>
        <p>
          The IDAT shared dataset [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] includes tweets related to di erent political issues
and events related to the Middle East that was held during the years 2011 to
2018. Tweets are written in a formal language (standard Arabic) and in dialects
of some Arab countries: Egypt, Gulf, Levantine (dialect of Syria, Lebanon and
Palestine), and Maghrebi dialects. Table 1 shows the distribution of the tweets
for the shared task of irony detection.
Baseline : In every experiment, we used frequency Bag of Words (BoW) model
as lexical features. We also performed standard text pre-processing by deleting
user mentions, URLs, stop words and the words containing less than 3 characters.
        </p>
        <p>To set a baseline for our models we used the SVM model which is widely
used for classi cation tasks in general and the irony detection in particular.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Convolutional neural network (CNN) : Our both proposed models imple</title>
        <p>ment CNN. However, each one uses di erent parameters. We used one
convolution (conv1D) layer, followed by a max pooling layer and a dropout of 20%.
Before the dense layer we used a atten layer.</p>
        <p>In Fig.1 we give the general architecture of our CNN model.
Word embedding model (M1) : We used keras Embedding layer 3. It requires
that the input data is digitally encoded. The Embedding layer is initialized with
random weights and will learn an embedding for all of the words in the training
dataset.</p>
        <p>For this rst proposed model we tried creating pre-trained vectors, but during
the tests the use of the keras Embedding layer helped improve the results.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Sub-word embedding and feature selection (M2) : The sub-word embed</title>
        <p>ding model relies on the best features that yield the best results. Therefore, we
followed some steps to help us achieve this.</p>
        <p>First, we relied on chi2 4 to extract relative features (url existence, word
count, negative and positive word count, punctuation count, tag existence). In
order to extract the positive and negative words, we relied on publicly available
lexicons5.</p>
        <p>The following graph (Fig. 2) shows the features that gave the best scores.
Second, we created our sub-words in a BOW format.</p>
        <p>Third, we used keras layer to create the embedding vectors.</p>
        <p>Lastly, we merged the features array with the sub-words embedding array
for each tweet.</p>
        <p>The following table (2) gives the detailed parameters for each model:
The tests concluded that these two models give the best results compared
to the others (long short term memory, ...). The following section details these
results.
3 https://keras.io/layers/embeddings/#embedding
4 https : ==scikit learn:org=stable=modules=generated=sklearn:f eatureselection:chi2:html
5 https://saifmohammad.com/WebPages/ArabicSA.html
We tested several machine learning algorithms in order to evaluate and select
the best performing one. Table 3 presents the results of the tests during the
testing phase for each class and the o cial results. In terms of accuracy (A),
macro-averaged F- score (F), precision (P) and recall (R).</p>
        <p>As we can see the M2 model gave the best performance. These results were
obtained by using a train-test con guration of a random test, not by using
cross validation. These results are comparable to the ones obtained during the
testing phase. Although we encountered a signi cant decrease in the systems
performance in the o cial test, we believe that our system can be used for tasks
such as irony or sarcasm detection.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>In this article, we have proposed two models that can be used to identify ironic
messages, incorporating various features to capture ironic statements. Our
results revealed good classi cation performance on the training dataset, but a lower
performance on the evaluation data, with a notable decrease in the F-score. We
found that a majority of the systems we tested consistently provided slightly
higher scores for the ironic texts. We believe that this is due to the fact that the
dataset has more texts labeled as ironic.</p>
      <p>In our future work we plan to study ways to improve our system for
classication tasks. We also want to test the part-of-speech tagging to see whether
it a ects the results. What are the words that are more ironic adjectives or
adverbs? Such features and more are very interesting to explore.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ghanem</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karoui</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Benamara</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moriceau</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Idat@ re2019: Overview of the track on irony detection in arabic tweets</article-title>
          . In: Mehta P.,
          <string-name>
            <surname>Rosso</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Majumder</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mitra</surname>
            <given-names>M</given-names>
          </string-name>
          . (Eds.)
          <article-title>Working Notes of the Forum for Information Retrieval Evaluation (FIRE 2019)</article-title>
          . CEUR Workshop Proceedings. In: CEUR-WS.org, Kolkata, India, December
          <volume>12</volume>
          -
          <fpage>15</fpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ghosh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veale</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Ironymagnet at semeval-2018 task 3: A siamese network for irony detection in social media</article-title>
          .
          <source>In: Proceedings of The 12th International Workshop on Semantic Evaluation</source>
          . pp.
          <volume>570</volume>
          {
          <issue>575</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Hernandez-Far as</surname>
          </string-name>
          , I.,
          <string-name>
            <surname>Bened</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Applying basic features from sentiment analysis for automatic irony detection</article-title>
          .
          <source>In: Iberian Conference on Pattern Recognition and Image Analysis</source>
          . pp.
          <volume>337</volume>
          {
          <fpage>344</fpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Jia</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Deng</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Min</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Three-way decisions based feature fusion for chinese irony detection</article-title>
          .
          <source>International Journal of Approximate Reasoning</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Karoui</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farah</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moriceau</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patti</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bosco</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aussenac-Gilles</surname>
          </string-name>
          , N.:
          <article-title>Exploring the impact of pragmatic phenomena on irony detection in tweets: A multilingual corpus study</article-title>
          .
          <source>In: Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume</source>
          <volume>1</volume>
          ,
          <string-name>
            <given-names>Long</given-names>
            <surname>Papers</surname>
          </string-name>
          . pp.
          <volume>262</volume>
          {
          <issue>272</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Karoui</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zitoune</surname>
            ,
            <given-names>F.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moriceau</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Soukhria: Towards an irony detection system for arabic in social media</article-title>
          .
          <source>Procedia Computer Science</source>
          <volume>117</volume>
          ,
          <issue>161</issue>
          {
          <fpage>168</fpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Levy</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goldberg</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Dependency-based word embeddings</article-title>
          .
          <source>In: Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume</source>
          <volume>2</volume>
          :
          <string-name>
            <given-names>Short</given-names>
            <surname>Papers</surname>
          </string-name>
          <article-title>)</article-title>
          .
          <source>vol. 2</source>
          , pp.
          <volume>302</volume>
          {
          <issue>308</issue>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corrado</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>E cient estimation of word representations in vector space</article-title>
          .
          <source>arXiv preprint arXiv:1301.3781</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sutskever</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corrado</surname>
            ,
            <given-names>G.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Distributed representations of words and phrases and their compositionality</article-title>
          .
          <source>In: Advances in neural information processing systems</source>
          . pp.
          <volume>3111</volume>
          {
          <issue>3119</issue>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pennington</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Socher</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manning</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          : Glove:
          <article-title>Global vectors for word representation</article-title>
          .
          <source>In: Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP)</source>
          . pp.
          <volume>1532</volume>
          {
          <issue>1543</issue>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rangel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Far</surname>
            as,
            <given-names>I.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cagnina</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaghouani</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Char</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A survey on author pro ling, deception, and irony detection for the arabic language</article-title>
          .
          <source>Language and Linguistics Compass</source>
          <volume>12</volume>
          (
          <issue>4</issue>
          ),
          <year>e12275</year>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Sigar</surname>
            ,
            <given-names>A.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taha</surname>
            ,
            <given-names>Z.S.:</given-names>
          </string-name>
          <article-title>A contrastive study of ironic expressions in english and arabic</article-title>
          .
          <source>College Of Basic Education Researches Journal</source>
          <volume>12</volume>
          (
          <issue>2</issue>
          ),
          <volume>795</volume>
          {
          <fpage>815</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>