<!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>Voting ensemble model based Malayalam-English sentiment analysis on code-mixed data</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>K.Nimmi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>B.Janet</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Applications, National Institute of Technology</institution>
          ,
          <addr-line>Tiruchirappalli</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The most serious issue with code-mixing is that people switch between languages (for example, Malayalam and English) and type in English instead of writing Malayalam words. Traditional NLP models can't handle data code-mixing data. Sentiment Analysis on Kannada-English, Malayalam-English, or Tamil-English code-mixed datasets based on five labels is the Dravidian Code-Mixed FIRE 2021 challenge. The classification is to be done based on the following labels 'Not-Malayalam, "Neutral state, 'Positive, 'Mixed feelings, 'Negative'. This paper focuses on Malayalam-English code-mixed data sentiment analysis based on the Ensemble voting model with machine learning models - Support Vector machine (SVM) and Logistic Regression and Bagging. The Hard Voting classifier model provided an accuracy : 67.78 % and F1-score : 67.53%.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Voting ensemble model</kwd>
        <kwd>Bagging</kwd>
        <kwd>Code mixed</kwd>
        <kwd>Support Vector Machine</kwd>
        <kwd>Logistic regression</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        same discussion is code mixing [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Words from various languages can be found in codemixed
languages. According to Choudhary et al. Code-mixed [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] data borrows vocabulary and syntax
from various languages, and it frequently creates new structures based on user input.
      </p>
      <p>
        During sentiment analysis the sentiments are extracted from the dataset and categorize them
for usage in a variety of applications such as customer service, social media content moderating
and reputation management, [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Based on feedback or even the polarity of remarks, sentiment
analysis has benefited the industry in generating a summary of human opinions and interests,
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This paper focuses on (Malayalam-English) code mixed comments classification using an
Ensemble voting model formed using Support Vector Machine (SVM), Logistic Regression and
Bagging. The performance of hard voting was higher when compared to the soft voting model.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Works</title>
      <p>
        Advani et al. proposed a machine learning algorithm that can detect the diference between
positive and negative feelings based on lexical, metadata features and sentiment[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Sharma et al.
developed a shallow Hindi-English code-mixed social media text parser [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]; this shallow parser
model was modelled as three separate sequence labeling problems. Singh and Lefever developed
a cross lingual embeddings technique for Hinglish code mix data [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] that is unsupervised. The
performance of various transformer models is analyze in [10] on code-mixed data sentiment
analysis. To identify sentiment on code mixed text (Hindi and English), [11] used a lexicon-based
technique. In a code-mixed Hinglish dataset, [12] shows a strategy for detecting hate speech.
Only a few research have used code-mixed Dravidian language datasets for sentiment analysis
the details of text classification using deep learning models to identify the Malayalam-English
[13] and Tamil-English sentiments are provided in [14] ; Dravidian-CodeMix-FIRE 2020 was a
sentiment polarity classification challenge on code mix data for classification of Youtube into
ifve classes which is based on the code mix dataset. A computational technique was proposed
by Das and Bandyopadhyay used publicly available English Sentiment lexicons and a bilingual
English-Bengali dictionary [15] to create a SentiWordNet equivalent for the language Bengali.
Baruah et al. found that on code-mixed Malayalam text, the SVM classifier [ 16] trained using
TF-IDF word and character features of n-grams performed the best.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Methodology</title>
      <sec id="sec-3-1">
        <title>3.1. Data and Pre-Processing</title>
        <p>The Dravidian Code-Mix FIRE 2021 project’s purpose is to categorize YouTube comment
codemixed datasets written in Kannada-English, Malayalam-English, or Tamil-English into five labels
based on sentiment polarity. Emotion polarity is assigned to each comment at the comment level.
In real-world situations, this dataset has concerns with class imbalance. In
Dravidian-CodeMixFIRE 2021 challenge more dataset was provided with the majority of the comments written in
either Malayalam, Tamil, or Kannada grammar with English lexicon or Malayalam, Tamil, or
Kannada lexicon with English grammar. Variety of comments were written in Malayalam, Tamil,
and Kannada script, with English phrases interleaved. The detailed description of datasets used
is provided in two papers [17] and [18] along with details on how the data was acquired and
labeled in the datasets. In Table 1, the statistics for each class are tabulated.</p>
        <p>We employed pre-processing methods to clean the comments in the dataset, such as replacing
emojis with similar words, changing the comment to lower case, eliminating stop words, HTML
tags, and accented characters.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Model Description</title>
        <p>Ensemble learning can take several forms, such as stacking, bagging, and so on. Because of
the bagging method’s eficiency and ease, this paper created an ensemble model as both hard
voting and soft voting classifier based on bagging by combining three classifiers. Conventional
Machine Learning classifier; Support Vector Machine (SVM) [ 19], bagging model and Logistic
Regression [20] are combined to create an ensemble model for Dravidian code mix sentiment
identification. The goal of ensembling of simple classifiers is to create a robust classifier that
takes advantage of each classifier’s strengths. TF-IDF [ 21] vectors obtained during feature
engineering are used to train the model. Figure1 describes the model block diagram.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Implementation Details</title>
      <p>We used a Windows 10, 64-bit operating system, Intel Core i5 CPU 2.40 GHz, and IDE drive
for code-mix data sentiment analysis. We employ Anaconda 2019.10, an open-source program
for developing Machine Learning projects and current Python libraries such as scikit-learn
and Pandas (IDE). To extract features, the tf-idf technique [21] is used. Various parameters
were tried, but the best results were provided by the following parameters. For SVM model,
radial basis function kernel (‘rgf’ )is used with a ’C’ value of 100. The ’c’ value used in logistic
regression is 100, and the kernel is ‘linear.’ The bagging model used in this experiment use
SVM as a base estimator. The ensemble model used for classification is majority voting. We had
trained the model for Malayalam English code-mix data. Sklearn library [22] is used to build
the model.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Results</title>
      <p>Hard Voting classifier provided an accuracy of 67.78 % and precision of 67.17% and recall of
67.78% and F1-score of 67.04%. Soft voting classifier have provided an Accuracy of 67.53% and
precision of 66.93% and Recall of 67.53% and F1-score of 66.96% respectively. In Table 2 the
classification metrics of Hard Voting classifier is provided and in Table 3 the classification
metrics of soft ensemble model on test data is provided. The overall model performance is
provide in the Table 4. From the Table 4, it is clear that Hard Voting model achieved slightly
Label
Positive
unknown_state
Negative
Not-Malayalam
Mixed_feelings
Label
Positive
unknown_state
Negative
Not-Malayalam
Mixed_feelings</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>This paper uses a Hard and Soft voting ensemble model to categorize Code-Mixed Malayalam
and English comments dataset. Hard Voting ensemble model provided slighly better accuracy
than Soft Voting classifier. In the future, applying a deep learning ensemble model on the dataset
can improved the model performance and fine-tuning the model to find sarcastic Manglish
comments.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Opportunities in code-mixing</title>
      <p>The demand for sentiment analysis of text from social media, which is usually code-mixed, is
growing. However, there are limited tools available to develop models specifically for
codemixed data. The papers which provide details of codemix data are listed below. The research
in [23] provide details of a dataset of Dravidian languages (Kannada, Malayalam, and Tamil)
for detecting abusive language in social media and filtering user-generated material in local
languages. In the study [24], the authors introduce a Kannada CodeMixed Dataset (KanCMD),
a code mixed text, multi-task learning dataset in Kannada language for ofensive language
detection and sentiment analysis. The paper [25] describe a resource named (TamilMemes)
which is used to recognizing a troll meme in Tamil, which help in detecting and dealing with
trolls so that before harming an individual. Chakravarthi et al. explain how they created the
corpus and assigned polarities to code-mixed Malayalam-English code-mixed data[26] and
Chakravarthi et al. provides details of Tamil-English [27], respectively for sentiment analysis
using comments on social media, thereby providing a benchmark dataset.
[10] S. Banerjee, B. R. Chakravarthi, J. P. McCrae, Comparison of pretrained embeddings to
identify hate speech in indian code-mixed text, in: 2020 2nd International Conference
on Advances in Computing, Communication Control and Networking (ICACCCN), IEEE,
2020, pp. 21–25.
[11] S. Sharma, P. Srinivas, R. C. Balabantaray, Text normalization of code mix and sentiment
analysis, in: 2015 international conference on advances in computing, communications
and informatics (ICACCI), IEEE, 2015, pp. 1468–1473.
[12] P. Rani, S. Suryawanshi, K. Goswami, B. R. Chakravarthi, T. Fransen, J. P. McCrae, A
comparative study of diferent state-of-the-art hate speech detection methods in
hindienglish code-mixed data, in: Proceedings of the Second Workshop on Trolling, Aggression
and Cyberbullying, 2020, pp. 42–48.
[13] B. R. Chakravarthi, N. Jose, S. Suryawanshi, E. Sherly, J. P. McCrae, A sentiment analysis
dataset for code-mixed malayalam-english, arXiv preprint arXiv:2006.00210 (2020).
[14] B. R. Chakravarthi, R. Priyadharshini, V. Muralidaran, S. Suryawanshi, N. Jose, E. Sherly,
J. P. McCrae, Overview of the track on sentiment analysis for dravidian languages in
code-mixed text, in: Forum for Information Retrieval Evaluation, 2020, pp. 21–24.
[15] A. Das, S. Bandyopadhyay, Subjectivity detection in english and bengali: A crf-based
approach, Proceeding of ICON (2009).
[16] A. Baruah, K. A. Das, F. A. Barbhuiya, K. Dey, Iiitg-adbu@
hasoc-dravidian-codemixifre2020: Ofensive content detection in code-mixed dravidian text, arXiv preprint
arXiv:2107.14336 (2021).
[17] B. R. Chakravarthi, R. Priyadharshini, S. Thavareesan, D. Chinnappa, D. Thenmozhi,
E. Sherly, J. P. McCrae, A. Hande, R. Ponnusamy, S. Banerjee, C. Vasantharajan, Findings
of the Sentiment Analysis of Dravidian Languages in Code-Mixed Text, in: Working Notes
of FIRE 2021 - Forum for Information Retrieval Evaluation, CEUR, 2021.
[18] R. Priyadharshini, B. R. Chakravarthi, S. Thavareesan, D. Chinnappa, T. Durairaj, E. Sherly,
Overview of the dravidiancodemix 2021 shared task on sentiment detection in tamil,
malayalam, and kannada, in: Forum for Information Retrieval Evaluation, FIRE 2021,
Association for Computing Machinery, 2021.
[19] M. Ahmad, S. Aftab, I. Ali, Sentiment analysis of tweets using svm, Int. J. Comput. Appl
177 (2017) 25–29.
[20] R. E. Wright, Logistic regression. (1995).
[21] T. Tokunaga, I. Makoto, Text categorization based on weighted inverse document frequency,
in: Special Interest Groups and Information Process Society of Japan (SIG-IPSJ, Citeseer,
1994.
[22] T. P. Trappenberg, Machine learning with sklearn, in: Fundamentals of Machine Learning,</p>
      <p>Oxford University Press, 2019, pp. 38–65.
[23] B. R. Chakravarthi, R. Priyadharshini, N. Jose, A. Kumar M, T. Mandl, P. K. Kumaresan,
R. Ponnusamy, H. R L, J. P. McCrae, E. Sherly, Findings of the shared task on ofensive
language identification in Tamil, Malayalam, and Kannada, in: Proceedings of the First
Workshop on Speech and Language Technologies for Dravidian Languages, Association
for Computational Linguistics, Kyiv, 2021, pp. 133–145. URL: https://aclanthology.org/2021.
dravidianlangtech-1.17.
[24] A. Hande, R. Priyadharshini, B. R. Chakravarthi, KanCMD: Kannada CodeMixed dataset
for sentiment analysis and ofensive language detection, in: Proceedings of the Third
Workshop on Computational Modeling of People’s Opinions, Personality, and Emotion’s
in Social Media, Association for Computational Linguistics, Barcelona, Spain (Online),
2020, pp. 54–63. URL: https://aclanthology.org/2020.peoples-1.6.
[25] S. Suryawanshi, B. R. Chakravarthi, Findings of the shared task on troll meme classification
in Tamil, in: Proceedings of the First Workshop on Speech and Language Technologies for
Dravidian Languages, Association for Computational Linguistics, Kyiv, 2021, pp. 126–132.</p>
      <p>URL: https://aclanthology.org/2021.dravidianlangtech-1.16.
[26] B. R. Chakravarthi, N. Jose, S. Suryawanshi, E. Sherly, J. P. McCrae, A sentiment analysis
dataset for code-mixed Malayalam-English, in: Proceedings of the 1st Joint Workshop on
Spoken Language Technologies for Under-resourced languages (SLTU) and Collaboration
and Computing for Under-Resourced Languages (CCURL), European Language Resources
association, Marseille, France, 2020, pp. 177–184. URL: https://aclanthology.org/2020.sltu-1.
25.
[27] B. R. Chakravarthi, V. Muralidaran, R. Priyadharshini, J. P. McCrae, Corpus
creation for sentiment analysis in code-mixed Tamil-English text, in: Proceedings of the
1st Joint Workshop on Spoken Language Technologies for Under-resourced languages
(SLTU) and Collaboration and Computing for Under-Resourced Languages (CCURL),
European Language Resources association, Marseille, France, 2020, pp. 202–210. URL:
https://aclanthology.org/2020.sltu-1.28.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Myers-Scotton</surname>
          </string-name>
          ,
          <article-title>Duelling languages: Grammatical structure in codeswitching</article-title>
          , Oxford University Press,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Suryawanshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Chakravarthi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Verma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Arcan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>McCrae</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Buitelaar</surname>
          </string-name>
          ,
          <article-title>A dataset for troll classification of tamilmemes</article-title>
          ,
          <source>in: Proceedings of the WILDRE5-5th Workshop on Indian Language Data: Resources and Evaluation</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>7</fpage>
          -
          <lpage>13</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Chakravarthi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Arcan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>McCrae</surname>
          </string-name>
          ,
          <article-title>Comparison of diferent orthographies for machine translation of under-resourced dravidian languages</article-title>
          ,
          <source>in: 2nd Conference on Language, Data and Knowledge (LDK</source>
          <year>2019</year>
          ),
          <source>Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N.</given-names>
            <surname>Choudhary</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Bindlish</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Shrivastava</surname>
          </string-name>
          ,
          <article-title>Sentiment analysis of code-mixed languages leveraging resource rich languages</article-title>
          , arXiv preprint arXiv:
          <year>1804</year>
          .
          <volume>00806</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Thavareesan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mahesan</surname>
          </string-name>
          ,
          <article-title>Sentiment analysis in tamil texts: A study on machine learning techniques and feature representation</article-title>
          ,
          <source>in: 2019 14th Conference on Industrial and Information Systems (ICIIS)</source>
          , IEEE,
          <year>2019</year>
          , pp.
          <fpage>320</fpage>
          -
          <lpage>325</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Thavareesan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mahesan</surname>
          </string-name>
          ,
          <article-title>Word embedding-based part of speech tagging in tamil texts</article-title>
          ,
          <source>in: 2020 IEEE 15th International Conference on Industrial and Information Systems (ICIIS)</source>
          , IEEE,
          <year>2020</year>
          , pp.
          <fpage>478</fpage>
          -
          <lpage>482</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Advani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lu</surname>
          </string-name>
          , S. Maharjan, C1 at semeval
          <article-title>-2020 task 9: Sentimix: Sentiment analysis for code-mixed social media text using feature engineering</article-title>
          , arXiv preprint arXiv:
          <year>2008</year>
          .
          <volume>13549</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Sharma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gupta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Motlani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Bansal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Mamidi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Sharma</surname>
          </string-name>
          ,
          <article-title>Shallow parsing pipeline for hindi-english code-mixed social media text</article-title>
          ,
          <source>arXiv preprint arXiv:1604.03136</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Lefever</surname>
          </string-name>
          ,
          <article-title>Sentiment analysis for hinglish code-mixed tweets by means of crosslingual word embeddings</article-title>
          ,
          <source>in: Proceedings of the The 4th Workshop on Computational Approaches</source>
          to Code Switching,
          <year>2020</year>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>51</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>