<!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>Neural Network Approach for Irony Detection from Arabic Text on Social Media</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ali Allaith</string-name>
          <email>allaith.net@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Shahbaz</string-name>
          <email>m.shahbaz@uet.edu.pk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mohammed Alkoli</string-name>
          <email>mohd.alkoli@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Engineering and Technology</institution>
          ,
          <addr-line>Lahore</addr-line>
          ,
          <country country="PK">Pakistan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Mysore</institution>
          ,
          <addr-line>Mysore</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Irony plays an important part in human social interaction which is used to emphasize occurrences that deviate from the expected. Humans manipulate each other in a very negative way by writing the opposite of what they mean. However, irony detection is a complex task even for humans. In this research, we study the problem of irony detection as a classification problem and utilized the dataset offered by the IDAT workshop. We also propose a classification system for detecting irony in the Arabic tweets using neural networks1.</p>
      </abstract>
      <kwd-group>
        <kwd>Irony Detection</kwd>
        <kwd>Text Classification</kwd>
        <kwd>Neural Networks</kwd>
        <kwd>Arabic Language</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The increasing of the information on the internet, especially in social media, leads to
many natural language problems. People express their textual opinion in online
resources like public forums and microblogging sites. One of the ways to express our
opinion, which is the most interesting, is by using figurative languages such as irony
and sarcasm. While there is a gap between the intended meaning and the literal
meaning, irony detection becomes a very difficult task due to the ambiguous interpretations.
Many researches and shared tasks related to the irony detection have been focused on
different languages such as English, French, and Italian languages however, a little
contribution has been done in Arabic language.</p>
      <p>
        Irony detecting has its implications in sentiment analysis, opinion mining, and
advertising as shown in [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1,2,3</xref>
        ] respectively. For example, the detection of irony before
applying sentiment analysis is a big challenge where sometimes the presence of irony
content may reverse the sentiment polarity of the text from positive to negative and vice
versa. Therefore, the sentiment analysis systems which exploit the basic approaches of
sentiment detection based on the frequency of the positive and negative terms will fail
to detect the exact sentiment class if there is an irony expression in the text.
Research in irony will not just improve the performance of sentiment analysis systems,
but instead it can help in understanding the cognitive process involved and how human
beings process and produce the kind of utterance. The irony is a broad concept which
has a strong association with some other discipline such as linguistics and psychology.
Many models have been developed for irony detection but the first model was
developed by (Utsumi, 1996) in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Other models have been proposed to address the irony
detection among tweets using different features such as cue-words or hashtags [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5, 6, 7</xref>
        ].
In [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], they analyzed tweets based on the #irony and #humor hashtags in order to
identify features to distinguish between these two classes. The corpus-based approach is
another mechanism to identifying irony from text [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. They collected a corpus that
contains 40,000 tweets relying on the self-tagged approach. The corpus used to build a
model to distinguish the ironic from non-ironic tweets using Naïve Bayes and decision
tree classification algorithms. The lexicon-based approach has been used in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] by
proposing a model to detect irony using lexical features such as rare terms frequency,
emoticons, positive and negative terms. Amazon reviews were used as a corpus for irony
classification in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The corpus was annotated using crowdsourcing. Different
features have been used to build the model including n-grams, emoticons, review rates,
punctuation marks, and interjections. They used a set of machine learning algorithms
such as Naïve Bayes, decision tree, logistic regression, random forest, and support
vector machine.
      </p>
      <p>
        Irony detection for other languages has been proposed for French and Italian languages
in [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
        ] respectively. On the other hand, few researchers have addressed the problem
of irony detection. An Arabic research in irony detection has been proposed in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
The proposed system is called “Soukhria”. They used four groups of features: surface
features, sentiment features, shifter features, and contextual features to build binary
classification for irony detection in tweets.
      </p>
      <p>The above mentioned techniques showed that there is no optimal model that could be
considered as a baseline for the irony detection problem. This paper proposes a neural
network model to classify ironic from non-ironic text in Arabic. The dataset (training
set and testing set) was offered by the IDAT workshop. The training dataset comprised
of 4000 tweets while the testing set is 1000 tweets. The training set tagged with two
class either ironic or non-ironic.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Task Overview</title>
      <p>
        In Ironic Detection in the Arabic Text (IDAT) overview [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], the task is to detect the
irony in Arabic tweets from different political issues and events in the middle east from
the period from 2011-2018. The dataset was collected from Twitter using a set of
predefined keywords. Tweets were written in both modern standard Arabic and Arabic
dialects. In this task, the system has to determine whether a tweet is ironic or non-ironic.
It is a binary classification task. The system evaluation was performed according to
(accuracy, precision, recall, and F1-measure). The submission was ranked using
F1measure.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Proposed Model</title>
      <p>In this part, we will describe the model which has been used to accomplish this task.
The inspiration for using neural networks for word embedding is the fast processing of
data in comparison with the traditional machine learning algorithms. We used an
opensource, free, and lightweight library called “fastText”. This library offered by Facebook
AI Research Lab. It is a neural network-based algorithm that is used efficiently in text
classification and word representation learning by obtaining vector representations for
words. We used the training dataset with ironic and non-ironic labels to automatically
recognize the irony from the testing set.
3.1</p>
      <p>Dataset
The dataset was offered by IDAT to apply text classification of irony detection from
Arabic tweets. The dataset was obtained from Twitter and is related to different events
in the middle east during the years 2011 to 2018. It was collected using a set of
predefined keywords and hashtags. The tweets in the dataset are written in modern standard
Arabic and Arabic dialects. The training and testing dataset descriptions are shown in
Table 1.
Looking at the text on the dataset, we observe that most of the tweets have punctuations,
numbers, and emoticons. One of the first steps to improve the performance of the irony
detection model is to apply some pre-processing tasks such as text normalization, stop
word removal, and word segmentation.
We performed experiments with two different neural network models to classify the
tweets in the dataset into ironic and non-ironic classes. These two classes were used to
train the training set and predict the testing set offered by the IDAT. For both models,
the training data contains 80% (4,023 tweets) and testing set 20% (1,006 tweets). Our
system ranked 8 and 17 among 27 submission runs in the IDAT result of the irony
detection of the Arabic tweets. Both models achieved 81.7% and 79.4% for model1 and
model2 respectively as described in the previous section. The main cause of
misclassification is the imbalance of the dataset classes where the ironic samples are more than
the non-ironic samples. Also using Arabic stemmer may improve the classification
results where in our experiments we use the basic text preprocessing tasks as shown in
3.2. Fig. 1. and Fig. 2. below show the top 10 frequent words in both ironic and
notironic tweets.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Reyes</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Buscaldi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Humor in the blogosphere: First clues for a verbal humor taxonomy</article-title>
          .
          <source>Journal of Intelligent Systems</source>
          ,
          <volume>18</volume>
          (
          <issue>4</issue>
          ),
          <fpage>311</fpage>
          -
          <lpage>332</lpage>
          (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Sarmento</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carvalho</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>M. J.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>De Oliveira</surname>
          </string-name>
          , E.:
          <article-title>Automatic creation of a reference corpus for political opinion mining in user-generated content</article-title>
          .
          <source>In Proceedings of the 1st international CIKM workshop on Topic-sentiment analysis for mass opinion</source>
          (pp.
          <fpage>29</fpage>
          -
          <lpage>36</lpage>
          ) (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kreuz</surname>
          </string-name>
          , R.:
          <article-title>Using figurative language to increase advertising effectiveness</article-title>
          .
          <source>In Office of naval research military personnel research science workshop. Memphis</source>
          ,
          <string-name>
            <surname>TN</surname>
          </string-name>
          (
          <year>2001</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Utsumi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A unified theory of irony and its computational formalization</article-title>
          .
          <source>In Proceedings of the 16th conference on Computational linguistics-Volume</source>
          <volume>2</volume>
          (pp.
          <fpage>962</fpage>
          -
          <lpage>967</lpage>
          ).
          <article-title>Association for Computational Linguistics (</article-title>
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Van</given-names>
            <surname>Hee</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          :
          <article-title>Can machines sense irony?: exploring automatic irony detection on social media (Doctoral dissertation</article-title>
          , Ghent University) (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Hernández-Farías</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Benedí</surname>
            ,
            <given-names>J. M.</given-names>
          </string-name>
          , &amp;
          <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.
          <fpage>337</fpage>
          -
          <lpage>344</lpage>
          ). Springer, Cham(
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Reyes</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Veale</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>A multidimensional approach for detecting irony in twitter</article-title>
          .
          <source>Language resources and evaluation</source>
          ,
          <volume>47</volume>
          (
          <issue>1</issue>
          ),
          <fpage>239</fpage>
          -
          <lpage>268</lpage>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Reyes</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Buscaldi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>From humor recognition to irony detection: The figurative language of social media</article-title>
          .
          <source>Data &amp; Knowledge Engineering</source>
          ,
          <volume>74</volume>
          ,
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Barbieri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Saggion</surname>
          </string-name>
          , H.:
          <article-title>Modelling irony in twitter</article-title>
          .
          <source>In Proceedings of the Student Research Workshop at the 14th Conference of the European Chapter of the Association for Computational Linguistics</source>
          (pp.
          <fpage>56</fpage>
          -
          <lpage>64</lpage>
          ) (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Buschmeier</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cimiano</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Klinger</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>An impact analysis of features in a classification approach to irony detection in product reviews</article-title>
          .
          <source>In Proceedings of the 5th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis</source>
          (pp.
          <fpage>42</fpage>
          -
          <lpage>49</lpage>
          ) (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Benamara</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grouin</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karoui</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moriceau</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Robba</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Introduction to the French irony Detetcion Shared Task (Analyse d'opinion et langage figuratif dans des tweets : pré- sentation et résultats du Défi Fouille de Textes DEFT2017) DEFT@TALN2017</article-title>
          . Orléans, France (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Cignarella</surname>
            ,
            <given-names>A. T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Frenda</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Basile</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bosco</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patti</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Overview of the evalita 2018 task on irony detection in italian tweets (ironita)</article-title>
          .
          <source>In Sixth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian (EVALITA</source>
          <year>2018</year>
          )
          <article-title>(Vol</article-title>
          .
          <volume>2263</volume>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          ). CEUR-WS (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <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>
          , &amp;
          <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>
          ,
          <fpage>161</fpage>
          -
          <lpage>168</lpage>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Bilal</surname>
            <given-names>Ghanem</given-names>
          </string-name>
          , Jihen Karoui, Farah Benamara, Véronique Moriceau and
          <string-name>
            <given-names>Paolo</given-names>
            <surname>Rosso</surname>
          </string-name>
          . IDAT@
          <article-title>FIRE2019: Overview of the Track on Irony Detection in Arabic Tweets</article-title>
          . In: Metha 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>
          .
          <source>CEUR Workshop Proceedings. CEUR-WS.org, Kolkata, India, December</source>
          <volume>12</volume>
          -15.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>