<!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>ghostwriter19 @ SardiStance: Generating new Tweets to Classify SardiStance EVALITA 2020 Political Tweets</article-title>
      </title-group>
      <abstract>
        <p>1 English. Understanding the events and the dominant thought is of great help to convey the desired message to our potential audience, be it marketing or political propaganda. Succeeding while the event is still ongoing is of vital importance to prepare alerts that require immediate action. A micro message platform like Twitter is the ideal place to be able to read a large amount of data linked to a theme and selfcategorized by its users using hashtags and mentions. In this research, I will show how a simple translator can be used to bring styles, vocabulary, grammar, and other characteristics to a common factor that leads each of us to be unique in the way we express ourselves.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Italiano. Comprendere gli eventi e il
pensiero dominante è di grande aiuto per
veicolare alla nostra potenziale audience il
messaggio desiderato sia esso di
marketing o di propaganda politica.</p>
      <p>Riuscirci mentre l'evento è ancora in corso
è di vitale importanza per predisporre alert
che richiedono un intervento immediato.
Una piattaforma di micro messaggi come
Twitter è il luogo ideale per poter leggere
una grande quantità di dati legata ad un
tema, e spesso auto categorizzati dai suoi
1 Copyright ©️ 2020 for this paper by its authors. Use
permitted under Creative Commons License
Attribution 4.0 International (CC BY 4.0).
stessi utenti per mezzo di hashtag e
menzioni.</p>
      <p>In questa ricerca mostrerò come un
semplice traduttore può essere usato per
portare a fattor comune stili, lessico,
grammatica e altre caratteristiche che
portano ognuno di noi ad essere unico nel
modo di esprimersi.
1</p>
    </sec>
    <sec id="sec-2">
      <title>Introduction</title>
      <p>Each of us has a unique way of writing. However,
the fewer options we have to experience ourselves
to express our concept, the more the necessary
synthesis leads to the loss of precious information
to accurately assess our real intentions.</p>
      <p>Furthermore, the more the subject is debated, the
more changes in style and tone occur. The
conversation becomes full of irony or aggressive.
Extrapolating a single line is dangerous without context.
The same sentence can have different
interpretations depending on the moment in which it is
pronounced, the audience it is intended for, the place
where you are, in the historical period in which it
was composed.</p>
      <p>
        My hypothesis is that we can translate all these
different styles into a single "language style" that
fully expresses the real intentions of the writer.
The challenge is to understand when a user has
expressed a comment in favor, against, or neutral
towards the Sardines' Italian political movement.
The research was carried out for the SardiStance
        <xref ref-type="bibr" rid="ref4">(Cignarella et al., 2020)</xref>
        task in the EVALITA
2020
        <xref ref-type="bibr" rid="ref2">(Basile et al., 2020)</xref>
        . Two models were
created for the Task 1, but they also performed well
on the Task 2.
      </p>
    </sec>
    <sec id="sec-3">
      <title>Description of the system</title>
      <p>The two tasks are similar. In Task A, it is
necessary to classify the stance of a tweet based only on
the text of the tweet. Task A is divided into two
subtasks:
 Constrained. It is allowed to use additional
resources such as a Lexicon but no other
resources (such as labeled tweets) to help the
training process.
 Unconstrained. Where each resource used
must be reported in the final report.</p>
      <p>In Task B, you can use the context information
provided by the post author. Additional
information refers:
 to post statistics (favors, retweets, reply,
source)
 to the author's information (number of
posts, number of followers, emoji in the
bio)
 to the author's circle of relationships
(friends, replies, retweets, and quotes)
The research focuses on Task A Constrained.
Considering the constraints of Task A, it is not
possible to access any additional information
other than the text of the tweet, I concentrated on
understanding how to clean it up.</p>
      <sec id="sec-3-1">
        <title>The Training dataset contains:</title>
        <p> the tweet ID
 the user ID
 the text
 the label</p>
      </sec>
      <sec id="sec-3-2">
        <title>The labels options are:</title>
        <p> Against
 Favor
 Neutral / None
To be sure to do not use any data except the text,
the user id, useful for Task B, was discarded.</p>
      </sec>
      <sec id="sec-3-3">
        <title>2 https://github.com/amaiya/ktrain 3 https://www.tensorflow.org/</title>
        <p>
          In order to validate my hypotheses, I used the
AlBERTo model, created from tweets,
          <xref ref-type="bibr" rid="ref9">(Polignano at
al., 2019)</xref>
          and an auto training system such as
Ktrain2, a framework that wrap TensorFlow3, to
classify the tweets. To avoid manual error and
involuntary optimization, I used the autofit option.
First, I wrote a series of algorithms to make the
texts to be compared homogeneous.
        </p>
        <p>The first one was to break up the composed
hashtags into sentences and words.</p>
        <p>For example, using capital letters as a separator:
 #IoStoConLeSardine has become "io sto
con le sardine" ["I'm with sardines"].
 #NessunoTocchiLeSardine has become
"nessuno tocchi le sardine"["nobody
touches the sardines"].</p>
        <p>As a second step, I made sure to remove repeated
vowels in a sentence, such as:
 "Svegliaaaa" to get the word "Sveglia"
[Wake up!].</p>
        <p>I also replaced the word sardines with
"PartitoPoliticoS" ["PoliticalPartyS"] to prevent the entity
from being mistaken for the fish that is its symbol.
I did not remove any stop words because it is
useful to create the translation system.</p>
        <p>At this point, I made a copy of the dataset to
translate it. I used the spaCy4 language functions of
POS tagging, Dependency Parse, and Entity
Recognition to have all the essential components
of my translator.</p>
        <p>The translator is a simple text representation. It is
a matter of rewriting the sentence following the
scheme:
 subject adjectives
 subjects
 verb in the infinitive form
 adjectives objects
 objects
 exclamations / other words
At this stage, the words are not modified to make
the sentence grammatically correct. Words are
exchanged places, only the verb are modified to the</p>
      </sec>
      <sec id="sec-3-4">
        <title>4 https://spacy.io/api/annotation</title>
        <p>infinitive form. The entities of type person [PER]
take precedence over others.</p>
        <p>
          The translator concentrates its attention on the
aspect inside the sentences to be sure to do not
remove valid sentiment polarity words
          <xref ref-type="bibr" rid="ref1">(Barbieri et
al, 2016)</xref>
          . And to avoid to lose them in a
roundtrip translation activity on translation services
          <xref ref-type="bibr" rid="ref8">(Marivate &amp; Sefara, 2020)</xref>
          . The attempt to
represent the text in a more recognizable and
identifiable form for an algorithm passes from the fact that
it can still recognize the entities described and the
polarity expressed for each of them. For this
purpose, the translator makes several attempts to fit
words into their suggested position.
        </p>
        <p>Finally, I trained two models with the Ktrain
framework. The model 1, which use the translated
tweets, was submitted as
ghostwriter19_Task_A_1_c. The model 2, trained with
the only cleaned tweets, was submitted as
ghostwriter19_Task_A_2_c.
2.1</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>First results</title>
      <p>The model will be evaluated with the F1-score.
The main score is the average of the F1-score of
the Favor tweets and the F1-score of the Against
tweets.</p>
      <p>When comparing the two models, the first result
is that the translated tweets performed worse,
albeit by a few percentage points (table 1).</p>
    </sec>
    <sec id="sec-5">
      <title>Model</title>
      <p>ghostwriter19_Task_A_1_c
ghostwriter19_Task_A_2_c</p>
      <sec id="sec-5-1">
        <title>Estimated Baseline</title>
        <p>Analyzing the results of both the models in detail
(table 2 and 3), we have that:
ghostwriter19_Task_A_1_c</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>F1-Score</title>
      <sec id="sec-6-1">
        <title>Against</title>
      </sec>
      <sec id="sec-6-2">
        <title>Favor</title>
      </sec>
      <sec id="sec-6-3">
        <title>Neutral</title>
      </sec>
      <sec id="sec-6-4">
        <title>Against</title>
      </sec>
      <sec id="sec-6-5">
        <title>Favor</title>
      </sec>
      <sec id="sec-6-6">
        <title>Neutral</title>
        <p>The problem is evident. Model 1 has a more
challenging time distinguishing the favor tweets from
neutral ones. The good news is that both the
models overcame the estimated baseline.
2.2</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Hashtags and Mentions</title>
      <p>Thinking that on Twitter the hashtags are also
used for classification purposes, the operation that
replaces them was modified. Now the hashtags are
added at the end of the new tweets. Also, the
mentions are considered and processed as hashtags
(table 4).</p>
    </sec>
    <sec id="sec-8">
      <title>Model</title>
      <p>ghostwriter19_Task_A_1_c
ghostwriter19_Task_A_2_c</p>
      <sec id="sec-8-1">
        <title>Estimated Baseline</title>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>F1-Score</title>
      <p>0.5822
Analyzing the results in detail (table 5), we can
see that:
ghostwriter19_Task_A_1_c</p>
    </sec>
    <sec id="sec-10">
      <title>F1-Score</title>
      <sec id="sec-10-1">
        <title>Against</title>
      </sec>
      <sec id="sec-10-2">
        <title>Favor</title>
        <p>Neutral
0.70
The model gained two percentage points for both
Against and Favor, compared with a one-point
loss in Neutral. Unfortunately, it still remains two
points below the model 2, with the only cleaned
tweets.
2.3</p>
      </sec>
    </sec>
    <sec id="sec-11">
      <title>Passive verbs</title>
      <p>Analyzing the new texts generated, I noticed that
essential information was lost by putting all the
verbs in the infinitive. If the verb was in the
passive form, the subject and object of the sentence
were reversed. At the same time, I noticed that
very long tweets contained more than one
sentence.</p>
      <p>I modified the translator to consider passive and
active verbs, swapping the sentence's subject and
object if necessary. The hashtags inserted at the
end of the tweet only left at the end of the new
tweet generated (table 6).</p>
    </sec>
    <sec id="sec-12">
      <title>Model</title>
      <p>ghostwriter19_Task_A_1_c
ghostwriter19_Task_A_2_c</p>
      <sec id="sec-12-1">
        <title>Estimated Baseline</title>
      </sec>
    </sec>
    <sec id="sec-13">
      <title>F1-Score</title>
      <p>0.6306
Analyzing the results in detail (table 7), we can
see that:
ghostwriter19_Task_A_1_c</p>
    </sec>
    <sec id="sec-14">
      <title>F1-Score</title>
      <p>The model gained five percentage points for
Against and Favor tweets, compared with a
onepoint more loss for Neutral ones. Now the
translation model is the best model.</p>
      <sec id="sec-14-1">
        <title>Against</title>
      </sec>
      <sec id="sec-14-2">
        <title>Favor</title>
      </sec>
      <sec id="sec-14-3">
        <title>Neutral 0.76 0.50 0.40</title>
      </sec>
    </sec>
    <sec id="sec-15">
      <title>Results</title>
      <p>Model 1 was ultimately 3 percentage points better
than Model 2 with the Training dataset. The best
performance of the model was also confirmed
with Test datasets, with 2.5 percentage points of
advantage.
3.1</p>
    </sec>
    <sec id="sec-16">
      <title>Results for Task A</title>
      <p>The final results with the Test dataset are:</p>
    </sec>
    <sec id="sec-17">
      <title>Model</title>
      <sec id="sec-17-1">
        <title>Baseline ghostwriter19_Task_A_1_c ghostwriter19_Task_A_2_c</title>
        <p>The model 1 is about 7.5% better than the baseline
(table 8).</p>
        <p>I remember that both models were trained with the
autofit option, so without any particular study, to
validate whether a "translation" of the original
text could bring apparent advantages.
3.2</p>
      </sec>
    </sec>
    <sec id="sec-18">
      <title>Results for Task B</title>
      <p>Although no context information was used, I still
proposed the predictions for Task A to Task B.
The final results with the Test dataset are:</p>
    </sec>
    <sec id="sec-19">
      <title>Model</title>
      <p>ghostwriter19_Task_A_1_c
ghostwriter19_Task_A_2_c</p>
      <sec id="sec-19-1">
        <title>Baseline</title>
        <p>Even if model 1 was not able to reach the
proposed baseline, the difference between the two
systems is 0.4% (table 9). The detailed results of
the models are showed in the tables 10 and 11.
3.3</p>
        <p>Detailed results for Task A</p>
        <p>Detailed results for Task B
model
1_c
2_c
0.8106
0.8094
0.5012
0.4784
0.3810
0.3778</p>
      </sec>
    </sec>
    <sec id="sec-20">
      <title>Conclusion</title>
      <p>In a preliminary way, the final results demonstrate
that it is possible to obtain an improvement of the
predictions by reducing the differences of
expression to a predetermined structure.</p>
      <p>
        The system is, however, right now, more efficient
in terms of training times and final scores than
ensemble systems of Bi-LSTM, which were used
successfully up to 2 years ago
        <xref ref-type="bibr" rid="ref3">(Bennici &amp;
Portocarrero, 2018)</xref>
        .
      </p>
      <p>The next step is also to optimize the model's
training to ascertain that the performance gain is
maintained and in what percentage. At the same time,
the translator can be improved by switching to a
sequence-to-sequence system for a meaningful
and efficient text representation that will include,
among other things, the change of every words
forms accordingly with the grammar and the
original intention of the writers (Lewis et al., 2019).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Barbieri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Basile</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Croce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nissim</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Novielli</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Patti</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Overview of the Evalita 2016 SENTIment POLarity Classification Task</article-title>
          .
          <source>In Proceedings of Third Italian Conference on Computational Linguistics</source>
          (CLiC-it
          <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>
          ), Naples, Italy. CEURWS.org.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Basile</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Croce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Di</surname>
            <given-names>Maro</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            , &amp;
            <surname>Passaro</surname>
          </string-name>
          ,
          <string-name>
            <surname>L.</surname>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>EVALITA 2020: Overview of the 7th Evaluation Campaign of Natural Language Processing and Speech Tools for Italian</article-title>
          .
          <source>In Proceedings of Seventh Evaluation Campaign of Natural Language Processing and Speech Tools for Italian. Final Workshop (EVALITA</source>
          <year>2020</year>
          ),
          <article-title>CEUR-WS.org</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Bennici</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Portocarrero</surname>
            ,
            <given-names>X. S.</given-names>
          </string-name>
          (
          <year>2018</year>
          ).
          <article-title>Ensemble for aspect-based sentiment analysis</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.
          <source>CEUR-WS.org.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Cignarella</surname>
            ,
            <given-names>A. T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lai</surname>
            ,
            <given-names>M.</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>
          (
          <year>2020</year>
          ).
          <article-title>SardiStance@EVALITA2020: Overview of the Task on Stance Detection in Italian Tweets</article-title>
          .
          <source>In Proceedings of the 7th Evaluation Campaign of Natural Language Processing and Speech Tools for Italian (EVALITA</source>
          <year>2020</year>
          ).
          <article-title>CEUR-WS.org</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>hamed</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Levy</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          , . . .
          <string-name>
            <surname>Zettlemoyer</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          (
          <year>2019</year>
          , Octo-
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <source>ber 29)</source>
          .
          <article-title>BART: Denoising Sequence-to-</article-title>
          <string-name>
            <surname>Sequence</surname>
          </string-name>
          Pre-
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          and Comprehension. https://arxiv.org/abs/
          <year>1910</year>
          .13461
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Marivate</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Sefara</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <source>Improving Short Text Classification Through Global Augmentation Methods. Lecture Notes in Computer Science Machine Learning and Knowledge Extraction</source>
          ,
          <fpage>385</fpage>
          -
          <lpage>399</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -57321-8_
          <fpage>21</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Polignano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Basile</surname>
            , P., de Gemmis,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Semeraro</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Basile</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Alberto: Italian bert language understanding model for nlp challenging tasks based on tweets</article-title>
          .
          <source>In Proceedings of the Sixth Italian Conference on Computational Linguistics</source>
          (CLiC-it
          <year>2019</year>
          ).
          <article-title>CEUR-WS.org</article-title>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>