<!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>LaSTUS/TALN at TASS 2019: Sentiment Analysis for Spanish Language Variants with Neural Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lut ye Seda Mut Altin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alex Bravo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Horacio Saggion</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Senti-</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LaSTUS-TALN Research Group, DTIC Universitat Pompeu Fabra C/Tanger 122-140</institution>
          ,
          <addr-line>08018 Barcelona</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>598</fpage>
      <lpage>604</lpage>
      <abstract>
        <p>This paper describes the participation of LaSTUS/TALN team in the shared task Sentiment Analysis at SEPLN (TASS) organized in the context of IberLEF 2019. TASS focuses on the classi cation of tweets written in the Spanish language (from Spain, Peru, Costa Rica, Uruguay and Mexico) with respect to their polarity or sentiment. This year TASS proposes two sub-tasks: monolingual and cross-lingual sentiment analysis. This paper presents a deep learning approach based on bidirectional LSTM (biLSTM) models to face both sub-tasks. The paper reports and discusses the o cial results achieved by our team.</p>
      </abstract>
      <kwd-group>
        <kwd>Natural Language Processing ment Analysis</kwd>
        <kwd>Spanish Language</kwd>
        <kwd>Neural Networks</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Sentiment analysis is the process of detecting subjective information of a given
text such as whether the text expresses a positive, negative or neutral opinion.
Sentiment analysis is widely used in several application areas. For instance,
private companies or political organizations are interested in knowing what their
clients think about their product or services [
        <xref ref-type="bibr" rid="ref11 ref7">7, 11</xref>
        ]. The number of users of
micro-blogging platforms such as Twitter grows day by day, making data from
these sources very useful for opinion mining and sentiment analysis.
      </p>
      <p>
        TASS at IberLEF 20191 focuses on the evaluation of polarity classi cation
systems of tweets written in the Spanish language spoken in Spain, Peru, Costa
Rica, Uruguay and Mexico [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The task consists of two sub-tasks:
{ Subtask 2: Cross-lingual Sentiment Analysis: Training in a combination of
datasets while using a di erent dataset to test. Since the languages spoken
in di erent Spanish-speaking countries di er considerably one-another, this
is a very challenging problem.
      </p>
      <p>This paper describes a neural network for sentiment analysis of Tweets in
Spanish. The rest of the paper is organized as follows: In section 2, we present an
overview of the related work for sentiment analysis, speci cally on Spanish. In
Section 3, we describe our model. In Section 4, we provide the results and discuss
the performance of the system. Lastly, in Section 5, we give the conclusions.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Previous research on Twitter sentiment analysis can be considered in two
categories: supervised approaches and lexicon-based approaches. Where supervised
methods are of concerned, the algorithms used are based on classi ers such as
Random Forest, Support Vector Machine, Naive Bayes with diverse features such
as Part-Of-Speech (POS) tags, N-grams, hashtags, retweets, emoticons [
        <xref ref-type="bibr" rid="ref2 ref3 ref5">2, 5, 3</xref>
        ].
In lexicon-based approaches, dictionaries of words with their sentiment
orientations have been used [
        <xref ref-type="bibr" rid="ref13 ref8 ref9">9, 8, 13</xref>
        ]. Deep learning methods have recently gained
popularity in this area [
        <xref ref-type="bibr" rid="ref14 ref4">4, 14</xref>
        ]. Tang et. al gave an overview for sentiment
analysis and stated that many studies with machine learning approach focused on
building powerful feature extractor with domain expert and feature engineering;
however deep learning approaches emerged as powerful computational models
that discover complex semantic representations of texts automatically from data
without feature engineering.[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] Moreover, recent sentiment analysis shared tasks
on various languages also showed that top ranked systems used deep learning
approaches or deep learning ensembles.[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
      </p>
      <p>
        In the previous edition of TASS (in 2018) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the Task 1 also promoted
the development and evaluation of systems able to automatically detect the
polarity of tweets written in Spanish. Five system were presented and most of
them used deep learning algorithms, combining di erent ways of obtaining word
embeddings combining them with hand-crafted linguistic features.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Data and Methodology</title>
      <p>The participants were provided with a training and a development corpora and
several test corpora. All the corpora are annotated with 4 di erent levels of
opinion intensity as positive, negative, neutral or none (P, N, NEU, NONE).</p>
      <p>We address the problem with a neural network based on two bidirectional
LSTM (biLSTM) models with two dense layers at the end. In Figure 1 a
simplied schema of our shared model can be seen.</p>
      <p>First, the tweets were preprocessed removing punctuation marks and keeping
emojis and full hashtags since they can contribute to de ne the meaning of a
tweet, and then, the tweets were tokenized.</p>
      <p>Second, the embedding layer transforms each element in the tokenized tweet
into a low-dimension vector. The embedding layer was randomly initialized from
a uniform distribution (between -0.8 and 0.8 values and with 100 dimensions).
In addition, the initialized embedding layer was updated with the corresponding
word vectors related to Spanish variant to predict, which were updated
during the training. These word vectors are included in a pre-trained model from
Regional Embeddings 2, which provides FastText word embeddings for Spanish
language variations.</p>
      <p>
        Then, two subsequent biLSTM layers get high-level features from previous
embeddings with 128 and 64 units, respectively. A disadvantage of LSTM models
is that they compress all information into a xed-length vector, causing the
incapability of remembering long tweets. To overcome the limitation of xed-length
vector keeping relevant information from long tweet sequences, after biLSTMs,
we added an attention layer producing a weight vector and merge word-level
features from each time step into a tweet-level feature vector, by multiplying the
weight vector [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Next, the tweet-level feature vector produced by the previous
layers is decreased by a fully-connected layer with a ReLU as activation
function and an output of 64 elements. Finally, the output produced by the previous
layer is used for classi cation task by a fully-connected layer with Softmax as
activation function.
      </p>
      <p>Moreover, to be able to mitigate over tting problem we applied dropout
regularization. Dropout operation sets randomly to zero a proportion of the hidden
units during forward propagation, creating more generalizable representations of
data. In the model, we employ dropout on the embeddings and biLSTM layers.
The dropout rate was set to 0.5 in all cases. Finally, the model was compiled
using the Adam optimizer and the categorical cross-entropy as loss function.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Results</title>
      <p>In the Subtask 1 (monolingual sentiment analysis), we used the training and test
dataset for each language (ES-Spain, PE-Peru, CR-Costa Rica, UR-Uruguay and
MX-Mexico). For this Subtask, our results have been ranked between third and
fth positions depending on the Spanish variant (see Table 1).</p>
      <p>On the other hand, in the Subtask 2 (cross-lingual sentiment analysis), we
trained our model using all datasets other than the test dataset. For example,
to predict results in Spanish (ES), we trained with the data for the following
Spanish variants: PE-Peru, CR-Costa Rica, UR-Uruguay and MX-Mexico. In
this case, we have achieved better results, between the second and third positions
depending on the Spanish variant (see Table 2).
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>In this paper, we presented our results for the participation to TASS task of
IberLEF 2019. We described and evaluated our system which is based on two
2 https://github.com/INGEOTEC/
biLSTM models with an Attention layer, to classify the tweet in 4 di erent levels
of opinion intensity (P, N, NEU, NONE). Regarding the results of the TASS task,
we have achieved better results in the cross-lingual sub-task, although the model
has been trained with di erent Spanish variants, there was more data to learn
the classi cation than the monolingual task. In Table 1 and Table 2, we can
also observe the best system of the task. Our results are usually close to the
winning system, indicating the di culty of the task. Due to time constraints, we
were not able to perform an error analysis, for that reason, in future work, we
will work in a detailed error analysis in order to understand the limitations of
our approach. Furthermore, more detailed analyses on integration of linguistic
annotations into neural network and other models (such as convolution) can be
considered in order to improve the performance of the model.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>Our work is partly supported by the Spanish Ministry of Economy and
Competitiveness under the Maria de Maeztu Units of Excellence Programme
(MDM2015-0502). We thank to reviewers for their constructive comments.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D</given-names>
            <surname>az-Galiano</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.C.</surname>
          </string-name>
          , et al.:
          <article-title>Overview of tass 2019</article-title>
          .
          <article-title>CEUR-WS, Bilbao</article-title>
          , Spain (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Hagen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Buchner,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Stein</surname>
          </string-name>
          ,
          <string-name>
            <surname>B.</surname>
          </string-name>
          :
          <article-title>Twitter sentiment detection via ensemble classi cation using averaged con dence scores</article-title>
          .
          <source>In: European Conference on Information Retrieval</source>
          . pp.
          <volume>741</volume>
          {
          <fpage>754</fpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Jianqiang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Combing semantic and prior polarity features for boosting twitter sentiment analysis using ensemble learning</article-title>
          .
          <source>In: 2016 IEEE First International Conference on Data Science in Cyberspace (DSC)</source>
          . pp.
          <volume>709</volume>
          {
          <fpage>714</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Jianqiang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiaolin</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xuejun</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Deep convolution neural networks for twitter sentiment analysis</article-title>
          .
          <source>IEEE Access 6</source>
          ,
          <issue>23253</issue>
          {
          <fpage>23260</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Jianqiang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xueliang</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Combining semantic and prior polarity for boosting twitter sentiment analysis</article-title>
          .
          <source>In: 2015 IEEE International Conference on Smart City/SocialCom/SustainCom (SmartCity)</source>
          . pp.
          <volume>832</volume>
          {
          <fpage>837</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Mart nez Camara</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almeida Cruz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , D az Galiano,
          <string-name>
            <given-names>M.C.</given-names>
            ,
            <surname>Estevez-Velarde</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          , Garc a Cumbreras,
          <string-name>
            <surname>M.A.</surname>
          </string-name>
          , Garc a Vega,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Gutierrez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Montejo</surname>
          </string-name>
          <string-name>
            <surname>Raez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Montoyo</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          , Mun~oz, R., et al.:
          <article-title>Overview of tass 2018: Opinions, health and emotions (</article-title>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Mart</surname>
            nez-Camara,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mart</surname>
            n-Valdivia,
            <given-names>M.T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Urena-Lopez</surname>
            ,
            <given-names>L.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montejo-Raez</surname>
            ,
            <given-names>A.R.</given-names>
          </string-name>
          :
          <article-title>Sentiment analysis in twitter</article-title>
          .
          <source>Natural Language Engineering</source>
          <volume>20</volume>
          (
          <issue>1</issue>
          ),
          <volume>1</volume>
          {
          <fpage>28</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Montejo-Raez</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mart</surname>
            nez-Camara,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mart</surname>
            n-Valdivia,
            <given-names>M.T.</given-names>
          </string-name>
          ,
          <article-title>Uren~a-</article-title>
          <string-name>
            <surname>Lopez</surname>
            ,
            <given-names>L.A.</given-names>
          </string-name>
          :
          <article-title>A knowledge-based approach for polarity classi cation in t witter</article-title>
          .
          <source>Journal of the Association for Information Science and Technology</source>
          <volume>65</volume>
          (
          <issue>2</issue>
          ),
          <volume>414</volume>
          {
          <fpage>425</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Paltoglou</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thelwall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Twitter, myspace, digg: Unsupervised sentiment analysis in social media</article-title>
          .
          <source>ACM Transactions on Intelligent Systems and Technology (TIST) 3</source>
          (
          <issue>4</issue>
          ),
          <volume>66</volume>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Rosenthal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farra</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nakov</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Semeval-2017 task 4: Sentiment analysis in twitter</article-title>
          .
          <source>In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017)</source>
          . pp.
          <volume>502</volume>
          {
          <issue>518</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Saggion</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Funk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Extracting opinions and facts for business intelligence</article-title>
          . Revue des Nouvelles Technologies de lInformation (RNTI) E-
          <volume>17</volume>
          ,
          <issue>119</issue>
          {
          <fpage>146</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Tang</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Qin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Deep learning for sentiment analysis: successful approaches and future challenges</article-title>
          .
          <source>Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery</source>
          <volume>5</volume>
          (
          <issue>6</issue>
          ),
          <volume>292</volume>
          {
          <fpage>303</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Thelwall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buckley</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paltoglou</surname>
          </string-name>
          , G.:
          <article-title>Sentiment strength detection for the social web</article-title>
          .
          <source>Journal of the American Society for Information Science and Technology</source>
          <volume>63</volume>
          (
          <issue>1</issue>
          ),
          <volume>163</volume>
          {
          <fpage>173</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Wehrmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Becker</surname>
            ,
            <given-names>W.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barros</surname>
          </string-name>
          , R.C.
          <article-title>: A multi-task neural network for multilingual sentiment classi cation and language detection on twitter</article-title>
          .
          <source>In: Proceedings of the 33rd Annual ACM Symposium on Applied Computing</source>
          . pp.
          <year>1805</year>
          {
          <year>1812</year>
          . ACM (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tian</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Qi</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hao</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Attention-based bidirectional long short-term memory networks for relation classi cation</article-title>
          .
          <source>In: Proceedings of the 54th 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>207</volume>
          {
          <issue>212</issue>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>