<!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>Language Identification in Mixed Script Social Media Text</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>S. Nagesh Bhattu</string-name>
          <email>nageshbs@idrbt.ac.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vadlamani Ravi</string-name>
          <email>vravi@idrbt.ac.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CoE on Analytics, IDRBT</institution>
          ,
          <addr-line>Castle Hills Road#1,Masab Tank, Hyderabad-500057</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <fpage>37</fpage>
      <lpage>39</lpage>
      <abstract>
        <p>With the spurt in usage of smart devices, large amounts of unstructured text is generated by numerous social media tools. This text is often lled with stylistic or linguistic variations making the text analytics using traditional machine learning tools to be less e ective. One of the speci c problem in Indian context is to deal with large number of languages used by social media users in their roman form. As part of FIRE-2015 shared task on mixed script information retrieval, we address the problem of word level language identi cation. Our approach consists of a two stage algorithm for language identi cation. First level classi cation is done using sentence level character n-grams and second level consists of word level character n-grams based classi er. This approach e ectively captures the linguistic mode of author in social texting enviroment. The overall weighted F-Score for the run submitted to FIRE Shared task is 0.7692. The sentence level classi cation algorithm which is used in achiving this result has an accuracy of 0.6887. We could further improve the accuracy of sentence level classi er further by 1.6% using additional social media text crawled from other sources. Naive Bayes classi er showed largest improvement (5.5%) in accuracy level by the addition of supplementary tuples. We also observed that using semi-supervised learning algorithm such as Expectation Maximization with Naive Bayes, the accuracy could be improved to 0.7977.</p>
      </abstract>
      <kwd-group>
        <kwd>Classi cation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>With the proliferation of social tools like twitter, facebook,
etc.. large volumes of text is being generated on a daily
basis. Traditional machine learning tools used for text
analysis such as Named Entity Recognization(NER) or Parts of
Speech Tagging or parsing, are dependent on the premise
that the text provided for them are in purer form. They
achieve their objective using cooccurrence patterns of
features. It has been observed by many studies that social
media text when fed to such machine learning algorithm, is
often plagued by the excessive out of vocabulary words(sparsity
of features). The FIRE-2015 shared task1 addresses the
language identi cation task as well as Named Entity
recognition in the context of Indian social fora, where the number
of languages used is more than 10 and all of them share
vocabulary excessively.</p>
      <p>
        To understand the complexity of the task we have posed the
primary problem of word-level language identi cation as a
multi-class classi cation using word lists gathered for each
language. These word-lists are obtained using the method
suggested in
        <xref ref-type="bibr" rid="ref2">Gupta et al. [2012</xref>
        ]. We have converted these
words into n-gram representation and built a classi er based
on multi-class logistic regression
        <xref ref-type="bibr" rid="ref4">McCallum [2002</xref>
        ] and
multiclass SVM (support vector machine)
        <xref ref-type="bibr" rid="ref1">Crammer and Singer
[2002</xref>
        ]. We conducted this experiment by taking n-gram
representation of each word of the training data as an instance
(leaving the NE words). This experiment yielded an
accuracy of 57%-54% respectively. The number of words used in
these word lists are given in table 1. The multi-class Logistic
functions likelihood is de ned as below
p(yjx) = Py` exp( y0 :F(x; y0))
exp( y:F(x; y))
(1)
Here y is the label associated with instance x. The instance
x is expressed in some feature representation F(x; y). In
the current work, feature representation is n-gram
represenation of words. y are class speci c parameters learnt during
maximum likelihood based training process.
      </p>
      <p>As the text segments are typically social media posts, the
number of languages with in a text segment can be safely
assumed to be 2. Using this corpus level prior knowledge,
we built a two-stage classi cation algorithm. The rst stage
consists of identi cation of sentence level language. We used
character-level n-grams of each of the sentences as training
data for building sentence level classi er. We have used
1,2,3,4,5 grams of all the words in the sentence as the
features. We divided the input training data into 80-20 splits
using 5-fold cross validation. We built a multi-class classi er
using softmax, Naive Bayes and Naive Bayes EM and SVM
algorithms using the training data. Among these Naive
Bayes EM is a semi-supervised learning algorithm, which
uses EM algorithm for improving the test data accuracy. In
preparing such training data, we have removed the URLs,
X, NE tagged words. The 5-fold cross-validation classi
cation accuracy are reported in Table 3. We tried varying the
number of n-grams to 3 and 4, which has the e ect of
depreciating the accuracy 3-6%. The class-wise distribution of
documents in the training data is given in Table 2.
We get 82% accuracy when we applied the multi-class
Logistic regression based classi er trained on the above data. We
have experimented with latent Dirichlet based topic model
for this with 100 as the number of topics which was not
providing accuracy levels beyond 60%. The results of
classi cation using training data are as given in table 3.</p>
    </sec>
    <sec id="sec-2">
      <title>1.1 Word-Level Classification</title>
      <p>
        After identifying the language pair used for writing a
particular posting, we further build binary classi ers for each
of the language pairs namely, bn-en,gu-en,kn-en,hi-en,
mlen,mr-en,ta-en,te-en. We use the words in the table 1 to
build the binary classi ers. We used Logistic regression
based binary classi er which are giving 92-94% accuracy on
training data. The character n-grams (where n is set to 5)
are used as features for the binary classi er. The approach
suggested in
        <xref ref-type="bibr" rid="ref6">Tackstrom and McDonald [2011</xref>
        ] uses latent
variable models for using document level sentiment ratings
to infer sentence level classi er.
      </p>
      <p>
        This approach of using word-level binary classi er works well
as long as the length of the words is su ciently long to
capture the n-gram characteristics of the language of our
interest. But, as we see, tweets often contain stylistic variations
which reduce the length of words signin cantly. When the
length of words is below 3, the words do not carry n-grams
representative of target language. To address this problem
we use words with in a window of two length on either side
to make for the sparsity of features of shorter words. This is
also a heuristic approach e ectively used in the other works
such as
        <xref ref-type="bibr" rid="ref3">Han and Baldwin [2011</xref>
        ].
      </p>
      <p>
        Named Entity detection for short text is much harder task,
as word-colocations and POS tagging do not work well with
mixed script.
        <xref ref-type="bibr" rid="ref5">Ritter et al. [2011</xref>
        ] have proposed a solution
based on word-clusters from a large collection of twitter
corpus. We use the tool provided by authors of
        <xref ref-type="bibr" rid="ref5">Ritter et al.
[2011</xref>
        ] for english tweets and a small lexicon of named
entities for all the other languages for dealing with
NamedEntity detection.
      </p>
    </sec>
    <sec id="sec-3">
      <title>2. EXPERIMENTS</title>
      <p>
        We have used
        <xref ref-type="bibr" rid="ref4">McCallum [2002</xref>
        ] for multi-class classi cation.
The table 4 contains the F1 scores of language identi
cation and Named entities. These are the results of test run
submitted for the FIRE workshop. We reported F1 score
which is a representative measure capturing both precision
and recall. As we have adopted 2-stage algorithm for word
level language identi cation, the classi cation accuracy of
the rst-level(sentence level) classi caion is most imprtant
for the further processing. As we can see in the results there
are languages like Gujarati which go misclassi ed by the
classi er, having zero F1 score. Named entity detection is
typically addressed using sequence level features which are
quite unreliable in short-message context. Our test run
results are limited to the presence in the training data.
      </p>
    </sec>
    <sec id="sec-4">
      <title>2.1 Errors and Analysis</title>
      <p>The error analysis is not complete without making the
classi er further accuracte. In this regard, we have manually
tagged the test data sentences to be of one of the languages</p>
      <p>Method
of our interest mixing with english. The authors are con
dent in tagging 6 of these languages, we depended on other
resources for distinguishing malayalam and tamil. As this
shared task largely focuses on english being the mixing
language we had to classify any of the training data sentences
into 9 classes. In order to improve this sentence level
language identi cation task, we collected tweets of the 8
languages of our interest using seed words of each of these
languages. The seed words are chosen in such a way that the
resultant tweets retrieved belonged to the mixed script
category. We added atleast 500 tweets for each class to make
up a total number of labeled sentences (sentence level tags)
to be 7656. We compare the accuracies of various learning
algorithms using this expanded training dataset. As we can
see accuracy has increased signin cantly by 6% for Naive
Bayes and 3% for Logistic regression. We report the
summary of experiments conducted in Table 5. The second
column shows the classi cation accuracy of sentence level
language identi cation with the training data provided in FIRE
shared task. The third column shows the accuracy results
using the expanded training dataset. We can observe that
the semi-supervised version of Naive Bayes (Naive Bayes EM
) is superior among all the classi ers. We can also observe
that Naive Bayes classi er is bene tted the most (5.5%
increase) by the supplementary tuples added to the training
data. Naive Bayes EM is improved by approximately 3%
and MaxEnt is improved by 1.6%.</p>
    </sec>
    <sec id="sec-5">
      <title>3. CONCLUSION</title>
      <p>In the current study we addressed the language identi
cation problem in mixed script socail media text, at the word
level, involving multiple indian languages namely bengali,
gujarati, hindi, kannada, malayalam, marathi, tamil, telugu.
Observing that the social media mixed script posts often
involve english as the mixing language and can involve
atmost one more other language as the length of the messages
are quite short, we used a two-stage classi cation approach
for sentence level langauge mode of the author and then a
binary classi er for distinguishing english and each of the
speci c languages listed above. The test run submitted has
given overall weighted F-measure of 0.7692. The sentence
level classi cation accuracy was 68.87%. We could further
improve this accuracy to 79.77% using abundantly available
social media tweets crawled using seed words of speci c
langauge.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgement</title>
      <p>We sincerely thank the active participation of members of
CoE Analytics, IDRBT, especially K. Sai Kiran, B. Shiva
Krishna for helping us in sentence level labeling, and word
level labeling. We thank IDRBT for providing the research
environment for executing this task.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Crammer</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Singer</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2002</year>
          ).
          <article-title>On the algorithmic implementation of multiclass kernel-based vector machines</article-title>
          .
          <source>J. Mach. Learn. Res.</source>
          ,
          <volume>2</volume>
          :
          <fpage>265</fpage>
          {
          <fpage>292</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Choudhury</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Bali</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Mining hindi-english transliteration pairs from online hindi lyrics</article-title>
          . In Chair),
          <string-name>
            <given-names>N. C. C.</given-names>
            ,
            <surname>Choukri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Declerck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            , DoA xan, M. U.,
            <surname>Maegaard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Mariani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Moreno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Odijk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            , and
            <surname>Piperidis</surname>
          </string-name>
          , S., editors,
          <source>Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)</source>
          , Istanbul, Turkey.
          <source>European Language Resources Association (ELRA).</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Han</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Baldwin</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Lexical normalisation of short text messages: Makn sens a #twitter</article-title>
          .
          <source>In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies - Volume 1, HLT '11</source>
          , pages
          <fpage>368</fpage>
          {
          <fpage>378</fpage>
          ,
          <string-name>
            <surname>Stroudsburg</surname>
          </string-name>
          , PA, USA. Association for Computational Linguistics.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>McCallum</surname>
            ,
            <given-names>A. K.</given-names>
          </string-name>
          (
          <year>2002</year>
          ).
          <article-title>Mallet: A machine learning for language toolkit</article-title>
          . http://mallet.cs.umass.edu.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Ritter</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clark</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mausam</surname>
          </string-name>
          , and
          <string-name>
            <surname>Etzioni</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Named entity recognition in tweets: An experimental study</article-title>
          .
          <source>In Proceedings of the Conference on Empirical Methods in Natural Language Processing, EMNLP '11</source>
          , pages
          <fpage>1524</fpage>
          {
          <fpage>1534</fpage>
          ,
          <string-name>
            <surname>Stroudsburg</surname>
          </string-name>
          , PA, USA. Association for Computational Linguistics.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>Tackstrom, O</article-title>
          . and
          <string-name>
            <surname>McDonald</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Semi-supervised latent variable models for sentence-level sentiment analysis</article-title>
          .
          <source>In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies: short papers-Volume</source>
          <volume>2</volume>
          , pages
          <fpage>569</fpage>
          {
          <fpage>574</fpage>
          .
          <article-title>Association for Computational Linguistics</article-title>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>