<!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>Sequential DNN for Sentiment Analysis of Dravidian Code-Mixed Language Com ments on YouTube</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Aaron Samuel. A</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lavanya Sambath Kumar</string-name>
          <email>lavanyas6@srmist.edu.in</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Subalalitha Chinnaudayar Navaneethakrishnan</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ratnasingam Sakuntharaj</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Sentiment Analysis, Sequential model, Deep Neural Network</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Eastern University</institution>
          ,
          <country country="LK">Sri Lanka</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>SRM Institute of Science and Technology</institution>
          ,
          <addr-line>Kattankulathur, Chengalpattu, Tamil Nadu</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <abstract>
        <p>A method for determining if a block of text is positive, neutral, or negative is sentiment analysis. As code-mixed material in many native languages is becoming increasingly widespread, there is also an increasing need for intense research in order to produce satisfactory results. This research paper aims to classify the sentiments from a data set of comments/posts into pre-defined classes belonging to the code-mixed text in Tamil, Malayalam, and Kannada by utilizing the Sequential Deep Learning model on the code-mixed data set. The sequential model achieved an f1-score of 0.20 for Tamil-English, 0.48 for Malayalam-English, and 0.47 for Kannada-English data sets. The results were submitted to the competition 'Shared Task on Sentiment Analysis and Homophobia detection of YouTube comments in Code-Mixed Dravidian Languages' organized by DravidianLangTech.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Sentiment analysis at the word level examines how the words or phrases in the text are oriented
and how that afects the overall mood, whereas sentiment analysis at the sentence level examines
sentences that represent one perspective and makes an efort to identify its direction. The
foundation of a lexicon-based method is a corpus or list of words with a particular diference.
Then, an algorithm searches for specific words, measures their weight or counts them, and
determines the overall duality of the text [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2, 3, 4</xref>
        ].
      </p>
      <p>In a country where several diferent languages are spoken, code-mixing becomes commonplace.
People who live in multilingual countries employ code-mixed discourse when interacting online
and in person. Code-mixing is ”the incorporation of linguistic forms from one language, such
as phrases, syllables, and morphemes into an expression of a diferent language.” There have
already been many experiments that were conducted to make use of sentiment analysis in
monolingual texts and they have been successful [15, 25]. But there have been far fewer
studies conducted for the sentiment analysis of code-mixed languages [16]. The task given
in the competition is to categorize the feelings expressed in the code-mixed language data
set’s YouTube comments. The objective of our study is to classify YouTube comments into the
following classes: Positive, negative, unknown_state, mixed-feelings, or if the word is not in
that respective language of that particular code-mixed language.</p>
      <p>
        Social media corporations have always been required to fund/contribute to sentimental analysis
research to protect social media users from cyberbullying. There have been numerous studies
that have looked into sentiment analysis models. However, just a few research papers have
looked into the use of Emoji characters on social media [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Emojis can significantly change
a message when used out of context [17, 20]. The number of studies done on sentiment
analysis of code-mixed formats has increased recently [
        <xref ref-type="bibr" rid="ref5 ref6 ref7 ref9">5, 6, 7, 9, 21, 22, 23, 24</xref>
        ]. Machine
learning models are known as ”sequence models” input or output data in a sequential fashion.
Time-series data, snippets of audio and video clips, text streams, and other types of data are
all examples of sequential data. In sequence models, recurrent neural networks (RNNs) are a
widely used technique [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Research into distinct sequential data, including time-series data,
text expressions, and also other sequential data led to the development of sequence models.
While these models perform better with sequential data, CNN (Convolutional Neural Network)
models are better suited to handle spatial data. [18]. In the current study, Dravidian languages
have been code-mixed with English, such as “Tamil”, “Malayalam” and “Kannada” [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13, 14</xref>
        ].
The data set that was utilized for this study is a component of Task A from the task ”Sentiment
Analysis and Homophobia Detection of YouTube Comments”. The current paper categorizes
each YouTube remark at the message level into one of the following categories: ”Positive,”
”Negative,” ”Not Tamil/Malayalam/Kannada,” ”Unknown_State,” and ”Mixed Feelings.”
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Data set Description</title>
      <p>
        The data set used here is provided by Task A proposed [19]. It is a collection of YouTube
comments in Tamil, Malayalam, and Kannada (data for all 3 from [
        <xref ref-type="bibr" rid="ref10 ref8">8, 10</xref>
        ]. The comments are all
heavily code-mixed and that data has been classified into five classes which are, unknown _state,
Mixed feelings, positive, negative, and not-(Tamil or Malayalam, or Kannada). The description
and split of the data set are illustrated in Table 1.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Text Pre-processing</title>
      <p>Due to the code-mixing and blatant disregard for grammatical rules in the data set downloaded
from YouTube. To use the data set efectively, the following processes are applied.
• Initially emojis, special characters, numbers, and punctuation were all eliminated as they
have no functional use to a statement.
• We lowercase all the characters and replace usernames with empty characters.
• We then split the comment into tokens.
• Next, we made a flat list of all words from the corpus and then we computed the number
of occurrences of all the words in the corpus.
• Padding is applied to the corpus next.
• We created a sequential model and passed the required layers to it.</p>
      <p>• To avoid over-fitting our model, we have used Early Stopping as well.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Proposed Methodology</title>
      <p>A Sequential DNN was developed for the sentiment analysis tasks. These networks received
their input from the embedding vectors. The text indexes are transformed into dense vectors
with defined sizes. The input length, embedding initializer, and embedding Regularizer assigned
were all of ”maximum length,” ”orthogonal,” and ”L2 Regularizer,” respectively. Next, we added
the LSTM layer and wrapped the layer with Bidirectional. The bi-directionality of a Keras layer
was added to the model by implementing tf.keras.layers.bidirectional to the model. Finally, we
used the Dense layer to classify the data into the 5 classes and used the ‘softmax’ activation
function. We compiled our model and defined the loss function, optimizer, and metrics. We pick
“Categorical Cross-Entropy” as the loss function because the provided task requires multi-class
categorization. For the given task, we used the default optimizer “Adam” and set the learning
rate to 0.01.</p>
      <p>The model is trained in order to fine-tune the parameters to produce the desired outputs for a
particular input. This is accomplished by putting inputs into the input layer, receiving an output,
computing the loss function using the output, and then fine-tuning the model parameters using
back-propagation. As a result, the model’s parameters will be fit and matched to the data. The
batch size for the model while fitting was 256 and the number of epochs was 2. Table 2 displays
the several parameters used in the Sequential model.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Implementation</title>
      <p>All the required modules and packages like TensorFlow, pandas, NumPy, Regular Expression,
Natural Language Toolkit, scikit-learn, etc. are all imported to the notebook file. The feature
extraction and model training is done in Python using the scikit-learn library. The text data is
transformed into TF-IDF feature vectors using the scikit-learn Tfidf Vectorizer.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Results</title>
      <p>The metrics precision, recall, and f1-score have been calculated for the code-mixed data sets. A
precision of 0.22, a recall of 0.18, and an f1-score of 0.20 were recorded for the Tamil-English
data set as shown in Table 3.</p>
      <p>A precision of 0.51, a recall of 0.57, and an f1-score of 0.48 were recorded for the
MalayalamEnglish data set as shown in Table 4.</p>
      <p>A precision of 0.48, a recall of 0.50, and an f1-score of 0.47 were recorded for the
KannadaEnglish data set as shown in Table 5. The comparison between our results and other competitors’
results was shown in Tables 3,4 and 5 respectively. As a result, we tested with the sequential
DNN model for the three code-mixed data sets. Any language can be used with this approach
because it is language-independent.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>Comparatively, we can see that the Malayalam-English data set had the highest f1-score,
precision, and recall, and the Tamil-English data set had the lowest f1-score, precision, and recall
with Kannada-English data set having precision and f1-score just slightly lesser than that of
Malayalam. However, when compared to the other two data sets, the Tamil-English data set
appeared to perform poorly with the model. However, it should be noticed that compared
to the other classes, the ’Positive’ class in the Tamil-English data set has significantly too
many instances. The imbalance in the data has resulted in lower accuracy. The training and
development data was substantial in comparison to the other two languages, which contributed
to the poor scores compared to Malayalam-English and Kannada-English data sets.
ment Analysis of YouTube Comments for Dravidian Languages. In Forum for Information
Retrieval Evaluation.
[14] Kumar, A., Saumya, S., &amp; Singh, J. P. (2020). 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) (pp. 582-590).
[15] Vilares, D., Alonso, M. A., &amp; Gómez-Rodríguez, C. (2015, September). Sentiment analysis
on monolingual, multilingual and code-switching twitter corpora. In Proceedings of the
6th workshop on computational approaches to subjectivity, sentiment and social media
analysis (pp. 2-8).
[16] Patra, B. G., Das, D., &amp; Das, A. (2018). Sentiment analysis of code-mixed indian languages:</p>
      <p>An overview of sail_code-mixed shared task@ icon-2017. arXiv preprint arXiv:1803.06745.
[17] Guibon, G., Ochs, M., &amp; Bellot, P. (2016, June). From emojis to sentiment analysis. In</p>
      <p>WACAI 2016.
[18] Yamashita, R., Nishio, M., Do, R. K. G., &amp; Togashi, K. (2018). Convolutional neural networks:
an overview and application in radiology. Insights into imaging, 9(4), 611-629.
[19] Chakravarthi, B.R., Priyadharshini, R., Ponnusamy, R., Kumaresan, P.K., Sampath, K.,
Thenmozhi, D., Thangasamy, S., Nallathambi, R. and McCrae, J.P., 2021. Dataset for Identification
of Homophobia and Transophobia in Multilingual YouTube Comments. arXiv preprint
arXiv:2109.00227.
[20] Shumugavadivel, Kogilavani and Subramanian, Malliga and Kumaresan, Prasanna Kumar
and Chakravarthi, Bharathi Raja and B, Bharathi and Chinnaudayar Navaneethakrishnan,
Subalalitha and S.K, Lavanya and Mandl, Thomas and Ponnusamy, Rahul and Palanikumar,
Vasanth and Balaji J, Manoj. Overview of the Shared Task on Sentiment Analysis and
Homophobia Detection of YouTube Comments in Code-Mixed Dravidian Languages. In
proceedings of dravidiancodemix-2022.
[21] Shanmugavadivel, K., Sampath, S.H., Nandhakumar, P., Mahalingam, P., Subramanian, M.,
Kumaresan, P.K. and Priyadharshini, R., 2022. An analysis of machine learning models for
sentiment analysis of Tamil code-mixed data. Computer Speech Language, p.101407.
[22] Chakravarthi, B.R., Hande, A., Ponnusamy, R., Kumaresan, P.K. and Priyadharshini, R.,
2022. How can we detect Homophobia and Transphobia? Experiments in a multilingual
code-mixed setting for social media governance. International Journal of Information
Management Data Insights, 2(2), p.100119.
[23] Chakravarthi, B.R., 2022. Hope speech detection in YouTube comments. Social Network</p>
      <p>Analysis and Mining, 12(1), pp.1-19.
[24] Chakravarthi, B.R., 2022. Multilingual hope speech detection in English and Dravidian
languages. International Journal of Data Science and Analytics, 14(4), pp.389-406.
[25] Subramanian, M., Ponnusamy, R., Benhur, S., Shanmugavadivel, K., Ganesan, A., Ravi,
D., Shanmugasundaram, G.K., Priyadharshini, R. and Chakravarthi, B.R., 2022. Ofensive
language detection in Tamil YouTube comments by adapters and cross-domain knowledge
transfer. Computer Speech Language, 76, p.101404.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Shiha</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Ayvaz</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>The efects of emoji in sentiment analysis</article-title>
          .
          <source>Int. J. Comput. Electr. Eng.(IJCEE.)</source>
          ,
          <volume>9</volume>
          (
          <issue>1</issue>
          ),
          <fpage>360</fpage>
          -
          <lpage>369</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Melville</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gryc</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Lawrence</surname>
            ,
            <given-names>R. D.</given-names>
          </string-name>
          (
          <year>2009</year>
          , June).
          <article-title>Sentiment analysis of blogs by combining lexical knowledge with text classification</article-title>
          .
          <source>In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining</source>
          (pp.
          <fpage>1275</fpage>
          -
          <lpage>1284</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Tan</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jiang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2011</year>
          ,
          <article-title>August)</article-title>
          .
          <article-title>User-level sentiment analysis incorporating social networks</article-title>
          .
          <source>In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining</source>
          (pp.
          <fpage>1397</fpage>
          -
          <lpage>1405</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Ding</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>P. S.</given-names>
          </string-name>
          (
          <year>2008</year>
          ,
          <article-title>February). A holistic lexicon-based approach to opinion mining</article-title>
          .
          <source>In Proceedings of the 2008 international conference on web search and data mining</source>
          (pp.
          <fpage>231</fpage>
          -
          <lpage>240</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Prabhu</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joshi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shrivastava</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Varma</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Towards sub-word level compositions for sentiment analysis of hindi-english code mixed text</article-title>
          .
          <source>arXiv preprint arXiv:1611</source>
          .
          <fpage>00472</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saumya</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>J. P.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>NITP-AI-NLP@ Dravidian-CodeMix-FIRE2020: A Hybrid CNN and Bi-LSTM Network for Sentiment Analysis of Dravidian Code-Mixed Social Media Posts</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>582</fpage>
          -
          <lpage>590</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Chakravarthi</surname>
            ,
            <given-names>B. R.</given-names>
          </string-name>
          , Jose, N.,
          <string-name>
            <surname>Suryawanshi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sherly</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>McCrae</surname>
            ,
            <given-names>J. P.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>A sentiment analysis dataset for code-mixed Malayalam-English</article-title>
          . arXiv preprint arXiv:
          <year>2006</year>
          .00210.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Priyadharshini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chakravarthi</surname>
            ,
            <given-names>B. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thavareesan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chinnappa</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thenmozhi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Ponnusamy</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          (
          <year>2021</year>
          , December).
          <article-title>Overview of the DravidianCodeMix 2021 shared task on sentiment detection in Tamil, Malayalam, and Kannada</article-title>
          .
          <source>In Forum for Information Retrieval Evaluation</source>
          (pp.
          <fpage>4</fpage>
          -
          <lpage>6</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Suryawanshi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Chakravarthi</surname>
            ,
            <given-names>B. R.</given-names>
          </string-name>
          (
          <year>2021</year>
          , April).
          <article-title>Findings of the shared task on Troll Meme Classification in Tamil</article-title>
          .
          <source>In Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages</source>
          (pp.
          <fpage>126</fpage>
          -
          <lpage>132</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Chakravarthi</surname>
            ,
            <given-names>B. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muralidaran</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Priyadharshini</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>McCrae</surname>
            ,
            <given-names>J. P.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Corpus creation for sentiment analysis in code-mixed Tamil-English text</article-title>
          . arXiv preprint arXiv:
          <year>2006</year>
          .00206.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Denoyer</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Gallinari</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Deep sequential neural network</article-title>
          .
          <source>arXiv preprint arXiv:1410</source>
          .
          <fpage>0510</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Chakravarthi</surname>
            ,
            <given-names>B. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arcan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>McCrae</surname>
            ,
            <given-names>J. P.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <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>
          ).
          <article-title>Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Andrew</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2020</year>
          , December). JudithJeyafreeda@
          <string-name>
            <surname>Dravidian-CodeMix-FIRE2020:</surname>
          </string-name>
          : Senti-
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>