<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>An ensemble-based model for sentiment analysis of Dravidian code-mixed social media posts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Abhinav Kumar</string-name>
          <email>abhinavanand05@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sunil Saumya</string-name>
          <email>sunil.saumya@iiitdwd.ac.in</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jyoti Prakash Singh</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Workshop Proceedings</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science &amp; Engineering, Siksha 'O' Anusandhan Deemed to be University</institution>
          ,
          <addr-line>Bhubaneswar</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department: Computer Science &amp; Engineering, Indian Institute of Information Technology Dharwad</institution>
          ,
          <country country="IN">India</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Department: Computer Science &amp; Engineering, National Institute of Technology Patna</institution>
          ,
          <country country="IN">India</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Sentiment analysis</institution>
          ,
          <addr-line>Code-mixed, Kannada-English, Tamil-English, Malayalam-English, YouTube, Ma-</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Sentiment analysis is highly important in social media monitoring since it helps us to see how the general population feels about a certain issue. Several studies have been published in recent years that attempt to extract sentiment from social media messages. However, the majority of the work is verified using just English language datasets. Machine learning algorithms do not perform equally well when social media posts are written in multilingual and code-mixed script. This paper presents an ensemble-based model to classify Kannada-English, Malayalam-English, and Tamil-English social media postings into five diferent sentiment classes using character-level TF-IDF features as input. The proposed ensemble-based model achieved the weighted  1-scores of 0.62, 0.73, and 0.62 for KannadaEnglish, Malayalam-English, and Tamil-English datasets, respectively. The code for the proposed models is available at: https://github.com/Abhinavkmr/Dravidian-Sentiment-Analysis-.git</p>
      </abstract>
      <kwd-group>
        <kwd>chine learning</kwd>
        <kwd>Deep learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Sentiment analysis helps in the recognition of opinions or responses on a given topic. Due to its
enormous influence on companies such as e-commerce, recommendation systems, hate speech
detection [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ], and disaster management [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ], and social media monitoring, it is one of the
most explored subjects in natural language processing. English is the most popular and widely
accepted language on the world, and it is widely used over Internet. However, in a nation like
India, where over 400 million people use the internet, people utilise more than one language
to express themselves, resulting in a new code-mixed language [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Dravidian languages such
as Malayalam and Kannada are spoken in the Indian states of Kerala and Karnataka. Tamil,
which is spoken by Tamil people in India, Singapore, and Sri Lanka, is another well-known
Dravidian language in India’s southern area. People on social media commonly use Roman
script to write these Dravidian languages since it is easy to do so with the keyboards accessible
on their devices. The majority of existing models trained to extract sentiment from a single
language fail to grasp the semantics of a code-mixed language. Due to its multilingual character,
extracting feelings from code mixed user-generated texts becomes more challenging [
        <xref ref-type="bibr" rid="ref6">6, 7</xref>
        ].
      </p>
      <p>The sentiment analysis of code-mixed language has recently caught the interest of the research
community [8, 9]. Kumar et al. [9] proposed a hybrid CNN and Bi-LSTM Network to classify
social media posts into diferent sentiment classes. Mahata et al. [ 10] proposed bi-directional
LSTM with language tagging to classify Tamil-English and Malayalam-English code-mixed
social media posts into diferent sentiment classes. Sharma and Mandalam [ 11], on the other
hand, employed sub-word level representation to capture text sentiment and implemented an
LSTM network to classify Tamil-English and Malayalam-English social media posts into the
diferent polarity classes. Patra et al. [ 12] presented a model for Bengali-English code mixed
data using a support vector machine with character n-grams features. To extract emotions from
Hinglish and Spanglish (Spanish + English) data, Advani et al. [13] utilised logistic regression
using handcrafted lexical and semantic features. Similarly, On Hinglish data, Goswami et al.
[14] presented a morphological attention model for sentiment analysis.</p>
      <p>This paper presents an ensemble-based model that uses character-level TF-IDF features to
classify Kannada-English, Malayalam-English, and Tamil-English social media posts into five
diferent sentiment classes. The proposed model is validated on the dataset provided in the
DravidianCodeMix FIRE 2021 [15, 16] track. The dataset includes five distinct sentiment classes,
including ”positive,” ”negative,” ”mixed feelings,” ”unknown state,” and ”if the post is not in the
mentioned Dravidian languages.”</p>
      <p>The rest of the sections are organized as follows: the proposed methodology is explained in
Section 2. The experimental findings are listed in Section 3 and Section 4 concludes the paper
by highlighting the main findings of this study.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Methodology</title>
      <p>The systematic diagram of the proposed ensemble-based model for the Kannada-English
language can be seen in Figure 1 whereas, the proposed model for Malayalam-English and
TamilEnglish can be seen in Figure 2. The proposed model is validated with the datasets given in the
DravidianCodeMix FIRE 2021 competition [16]. The overall data statistic for Kannada-English
[17], Malayalam-English [18], and Tamil-English [19] can be seen in Table 1.</p>
      <p>Extensive experiments were carried out with a variety of popular machine learning classifiers
using various combinations of one-to-six gram word-level and character-level TF-IDF features.
a
i
d
e
M
l
a
i
c
o
ishS tss
lgn oP
E
a
d
a
n
n
a</p>
      <p>K
h
s
i
l
g
n
-E s
il t
m so
aT aP
/
sh ied
i
lg M
-nE ila
m co
laa S
y
a
l
a
M
r
e
t
rac rse
raahCm taeFF</p>
      <p>u
)-G -ID
-61 FT
(
r
e
t
rac rse
raahCm taeFF</p>
      <p>u
)-G -ID
-61 FT
(</p>
      <sec id="sec-2-1">
        <title>Support Vector</title>
      </sec>
      <sec id="sec-2-2">
        <title>Machine</title>
      </sec>
      <sec id="sec-2-3">
        <title>Logistic</title>
      </sec>
      <sec id="sec-2-4">
        <title>Regression</title>
      </sec>
      <sec id="sec-2-5">
        <title>Random Forest</title>
      </sec>
      <sec id="sec-2-6">
        <title>Support Vector</title>
      </sec>
      <sec id="sec-2-7">
        <title>Machine</title>
      </sec>
      <sec id="sec-2-8">
        <title>Logistic</title>
      </sec>
      <sec id="sec-2-9">
        <title>Regression</title>
        <sec id="sec-2-9-1">
          <title>1/3(Σ PPostive)</title>
        </sec>
        <sec id="sec-2-9-2">
          <title>1/3(Σ PNegative)</title>
        </sec>
        <sec id="sec-2-9-3">
          <title>1/3(Σ PMixed-feelings)</title>
        </sec>
        <sec id="sec-2-9-4">
          <title>1/3(Σ PUnknown state)</title>
        </sec>
        <sec id="sec-2-9-5">
          <title>1/3(Σ PNot-kannada)</title>
          <p>We found that the ensemble of Support Vector Machine (SVM), Logistic Regression (LR), and
Random Forest (RF) performed best on the Kannada-English dataset, while the ensemble of SVM
and LR performed best on the Malayalam-English and Tamil-English datasets. The proposed
models are described in detail in the following sections.</p>
          <p>• Kannada-English: An ensemble-based model is proposed containing SVM, LR, and RF in
parallel (see Figure 1). This ensemble-based model uses one to six-gram character TF-IDF
features to predict the probability for each of the classes. To choose the suitable character
n-gram range, extensive experimentation was performed with one-gram to six-gram
character-level TF-IDF features. We found first 50,000 one to six-gram character-level
TF-IDF features were performed better than the other combination of character-level
n-gram TF-IDF features. The probabilities of all the three classifiers are then averaged
class-wise to get the final class probability. The final class for the post is assigned that
has the highest average class probability.</p>
          <p>Negative</p>
          <p>Positive
not-Kannada
unknown state</p>
          <p>Confusion matrix
not-Kannada</p>
          <p>unknownstate
Predicted label
300
250
200
150
100
50
0</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Results and Analysis</title>
      <p>Precision, recall, and the  1 -score are utilised to assess the suggested ensemble-based model’s
performance. The confusion matrix and AUC-ROC curve are also presented to highlight the
1.0
micro-average ROC curve (area = 0.90)
macro-average ROC curve (area = 0.86)
Mixed feelings (AUC = 0.78)
Negative (AUC = 0.91)
Positive (AUC = 0.84)
not-Kannada (AUC = 0.93)
unknown state (AUC = 0.84)
0.4 0.6
False Positive Rate
0.8</p>
      <p>1.0</p>
      <p>Confusion matrix
Mixed_feelingNsegative</p>
      <p>Positivenot-malayalam
Predicted label
unknown_state
model’s performance in addition to these measures. Table 2 shows the outcomes of the suggested
model for the Kannada-English, Malayalam-English, and Tamil-English languages.</p>
      <p>The suggested ensemble-based model has a weighted precision of 0.64, recall of 0.65, and
 1 -score of 0.62 for the Kannada-English dataset. Figures 3 and 4 show the ROC curve and
confusion matrix for the Kannada-English dataset, respectively. The suggested ensemble-based
model had a weighted precision, recall, and  1 -score of 0.73 for the Malayalam-English dataset.
Figures 5 and 6 show the confusion matrix and ROC curve for the Malayalam-English dataset,
respectively. The suggested ensemble-based model achieved a weighted precision of 0.61, recall
Mixed_feelings</p>
      <p>Negative
0.4 0.6
False Positive Rate
Mixed_feelingNsegative</p>
      <p>unknown_state
Predicted label
2000
1500
1000
500
of 0.65, and  1 -score of 0.62, respectively, on the Tamil-English dataset. Figures 7 and 8 show
the confusion matrix and ROC curve for the Tamil-English dataset, respectively.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Sentiment analysis of social media messages is an essential task in natural language
processing, which analyses social discussions and feedback to discover the deeper context as they
1.0
0.0
0.0
0.2
micro-average ROC curve (area = 0.90)
macro-average ROC curve (area = 0.84)
Mixed_feelings (AUC = 0.76)
Negative (AUC = 0.84)
Positive (AUC = 0.83)
not-Tamil (AUC = 0.94)
unknown_state (AUC = 0.82)
0.4 0.6
False Positive Rate
0.8
1.0
pertain to a topic, brand, or theme. This work proposes an ensemble-based model to classify
Kannada-English, Malayalam-English, and Tamil-English social media postings into five
different sentiment classes. The use of one to six-gram character-level feature performed best
with the other combinations of n-gram character-level features. For the Kannada-English,
Malayalam-English, and Tamil-English datasets, the suggested ensemble-based model achieved
weighted  1 -scores of 0.62, 0.73, and 0.62, respectively. To improve performance, a robust
deep ensemble-based model can be developed in the future by integrating character-level and
word-level features.
J. P. McCrae, Dravidiancodemix: Sentiment analysis and ofensive language identification
dataset for Dravidian languages in code-mixed text, arXiv preprint arXiv:2106.09460
(2021).
[7] A. Hande, S. U. Hegde, R. Priyadharshini, R. Ponnusamy, P. K. Kumaresan, S. Thavareesan,
B. R. Chakravarthi, Benchmarking multi-task learning for sentiment analysis and
offensive language identification in under-resourced Dravidian languages, arXiv preprint
arXiv:2108.03867 (2021).
[8] B. R. Chakravarthi, R. Priyadharshini, V. Muralidaran, S. Suryawanshi, N. Jose, J. P. Sherly,
Elizabeth McCrae, Overview of the track on Sentiment Analysis for Davidian Languages
in Code-Mixed Text, in: Working Notes of the FIRE 2020. CEUR Workshop Proceedings.,
2020.
[9] A. Kumar, S. Saumya, J. P. Singh, NITP-AI-NLP@ Dravidian-CodeMix-FIRE2020: A hybrid
CNN and Bi-LSTM network for sentiment analysis of Dravidian code-mixed social media
posts., in: FIRE (Working Notes), 2020, pp. 582–590.
[10] S. Mahata, D. Das, S. Bandyopadhyay, Sentiment classification of code-mixed tweets using
bi-directional rnn and language tags, in: Proceedings of the First Workshop on Speech
and Language Technologies for Dravidian Languages, 2021, pp. 28–35.
[11] Y. Sharma, A. V. Mandalam, Bits2020@ Dravidian-CodeMix-FIRE2020: Sub-word level
sentiment analysis of Dravidian code mixed data., in: FIRE (Working Notes), 2020, pp.
503–509.
[12] B. G. Patra, D. Das, A. Das, Sentiment analysis of code-mixed indian languages: An
overview of SAIL_code-mixed shared task@ ICON-2017, arXiv preprint arXiv:1803.06745
(2018).
[13] L. Advani, C. Lu, S. Maharjan, C1 at SemEval-2020 Task 9: SentiMix: Sentiment analysis for
code-mixed social media text using feature engineering, arXiv preprint arXiv:2008.13549
(2020).
[14] K. Goswami, P. Rani, B. R. Chakravarthi, T. Fransen, J. P. McCrae, ULD@ NUIG at
SemEval2020 Task 9: Generative morphemes with an attention model for sentiment analysis in
code-mixed text, arXiv preprint arXiv:2008.01545 (2020).
[15] 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.
[16] R. Priyadharshini, B. R. Chakravarthi, S. Thavareesan, D. Chinnappa, D. Thenmozi,
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.
[17] 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://www.aclweb.org/anthology/2020.peoples-1.6.
[18] 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://www.aclweb.org/anthology/
2020.sltu-1.25.
[19] 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://www.
aclweb.org/anthology/2020.sltu-1.28.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Mishra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Saumya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kumar</surname>
          </string-name>
          , IIIT_DWD@ HASOC 2020:
          <article-title>Identifying ofensive content in indo-european languages (</article-title>
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Saumya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Ofensive language identification in Dravidian code mixed social media text</article-title>
          ,
          <source>in: Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>36</fpage>
          -
          <lpage>45</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. K.</given-names>
            <surname>Dwivedi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. P.</given-names>
            <surname>Rana</surname>
          </string-name>
          ,
          <article-title>A deep multi-modal neural network for informative twitter content classification during emergencies</article-title>
          ,
          <source>Annals of Operations Research</source>
          (
          <year>2020</year>
          )
          <fpage>1</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Location reference identification from tweets during emergencies: A deep learning approach</article-title>
          ,
          <source>International journal of disaster risk reduction 33</source>
          (
          <year>2019</year>
          )
          <fpage>365</fpage>
          -
          <lpage>375</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>N.</given-names>
            <surname>Jose</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Chakravarthi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Suryawanshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Sherly</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>McCrae</surname>
          </string-name>
          ,
          <article-title>A survey of current datasets for code-switching research</article-title>
          ,
          <source>in: 2020 6th International Conference on Advanced Computing and Communication Systems (ICACCS)</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Chakravarthi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Priyadharshini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Muralidaran</surname>
          </string-name>
          , N. Jose,
          <string-name>
            <given-names>S.</given-names>
            <surname>Suryawanshi</surname>
          </string-name>
          , E. Sherly,
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>