<!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>WebArch at FIRE-2018 Track on Indian Native Language Identi cation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Aman Gupta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>SRM University</institution>
          ,
          <addr-line>Kattankulathur, Chennai, Tamil Nadu</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Native Language Identi cation (NLI) is the task which involves identi cation of native language (L1) of an individual based on his/her language production in a learned language (L2). It is basically a classi cation task where we are classifying L1 into a number of di erent languages. In this task I have to identify an individual's native language (L1) among the following six Indian languages: Bengali, Hindi, Kannada, Malayalam, Tamil, and Telugu using their Facebook comments written in English language (L2). In this paper I propose to use machine learning models such as classi cation models together with N-grams as features and T df as vectorizer.</p>
      </abstract>
      <kwd-group>
        <kwd>Native Language Identi cation cessing Classi cation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Native Language Identi cation (NLI) is the task of classifying the native
language (L1) of an individual into given di erent languages based on his/her
writing in another language (L2). NLI tasks involves identifying language use
patterns that are common to certain groups of speakers that share the same native
language. The native language of an individual in uences the usage of words as
well the errors that a person makes when writing in another language. The task
is usually considered as a classi cation problem where a machine learning
algorithm is trained in a supervised manner which can then be used for predicting
the native language of user text.</p>
      <p>Predicting the native language of a writer has applications in di erent elds.
It can be used for authorship identi cation, forensic analysis, tracing
linguistic in uence in potentially multi-author texts and naturally to support Second
Language Acquisition research. In the eld of cyber security, NLI can be used
to determine the native language of an author of a suspicious or threatening
text. In the eld of academics NLI can be used for educational applications such
as developing grammatical error correction systems which can personalize their
feedback and model performance to the native language of the user.</p>
      <p>In my research here I have used classi cation models such as Logistic
Regression, Linear SVC, Naive Bayes to name a few, together with features such as
N-Grams both at character level and word level to nd the best working model
which can e ciently classify L1 of a person to di erent sets of languages.</p>
      <p>
        NLI research has mostly been focused on texts where both lexical and
syntactic features were used. Models formed try to extract patterns that speakers with
di erent native language will have in terms of di erent misspellings,
mispronunciations or usage frequency of particular words. Also some languages have speci c
linguistic styles, like Japanese is much more formal in nature while French and
Spanish are way more romantic in nature because of their gentler vocabulary
whereas Russian and German can be classi ed as harsh because of their string
vocabulary. Kumar et al.[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] (2017) published an overview of FIRE-2017 which
similar to this was based on Native Language Identi cation using comments of
individuals on social networking sites. Malmasi et al.[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] published a report on
Native Language Identi cation Shared Task which depicted various approaches
taken by participants for solving Native Language Identi cation task. Malmasi
and Dras[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] tested a range of linear classi ers, and observed that state of the art
results was achieved by an ensemble model in 2017. The features they used were
simple unigrams, bigrams, and character n-grams. They also found that
character level features generally outperform word level features for NLI. Tsur and
Rappoport[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] also (2007) achieved an accuracy of 66% by using only character
bi-grams. Besides these Swanson and Charniak[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] uses a bit di erent approach
of using Tree Substitution Grammars (TSGs). Wong and Dras[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] also explored
production rules from two parsers in 2011.
3
      </p>
    </sec>
    <sec id="sec-2">
      <title>Task Description and Data</title>
      <p>Dataset provided by task organizers contains information collected from English
speakers of six di erent native Indian languages namely Tamil, Telugu, Kannada,
Malayalam, Bengali and Hindi. Data was collected through social networking site
Facebook. The distribution of class and training instances can be seen in Table
1.</p>
      <p>Language Training Instances</p>
    </sec>
    <sec id="sec-3">
      <title>Proposed Technique</title>
      <p>I have tried to model this task as a classi cation task. I have divided the given
dataset into three parts Training set (75%) , Testing set(12.5%) and Validation
set(12.5%).
Validation set was used to determine several hyper parameter values. For
determining whether to use stop words or not I used Count Vectorizer as a sample
vectorizer to calculate token counts, Logistic Regression as a sample classi cation
model. Two classi cation models were trained one " with stop words" other "
without stop words". Both were trained using training set data while accuracy
was calculated on validation set. I used Python's NLTK stop words as sample.
The results from both models were plotted (see Fig1.a). Validation Set Accuracy
being represented on Y-axis and Number of features(maximum no of words in
vocabulary) on X-axis.</p>
      <p>Accuracy for category "without stop words" was found to be higher when
number of features considered are large.Similar to this Validation Set was also
used to determine which N-gram are giving the best results.Unigrams, Bigrams,
Trigrams were under consideration. So I trained three sample Logistic regression
model one for every N-gram using training set data. Results from all three models
were plotted(see Fig1.b).Validation Set Accuracy being represented on Y-axis
and Number of features (maximum no of words in vocabulary) on X-axis.</p>
      <p>Accuracy for Unigrams were found to be highest when large number of
features are considered. Hence it is Unigrams which are able to best capture inherent
features of a language. Lastly I also determined which vectorizer to use. In my
research I considered TfIdf Vectorizer and Count Vectorizer as two di erent
candidates. Count Vectorizer basically converts a collection of text documents to
a matrix of token counts whereas TfIdf Vectorizer converts a collection of raw
documents to a matrix of T df features in simpler terms it is basically product
of term frequency(no of times a particular word appears in a single document)
and inverse document frequency(log of number of docs in your corpus divided
by the number of docs in which this term appears). In total six sample
Logis(a) StopWords Or Not
(b) N-grams
tic regression models were trained using training set data while accuracy was
calculated using validation set.</p>
      <p>Accuracy for T df vectorizer for Unigrams were found to be highest. Now
after determining the hyper parameter values I considered several classi cation
models. Each model was trained on training set while accuracy was calculated
using Validation set and compared with null accuracy (accuracy calculated from
model which always predicts the label which appeared maximum number of
times in training set). Table 3 summarizes the results.</p>
      <p>Based on the accuracy on Validation Set Passive-Aggressive classi er showed
the best results. Accuracy on Test dataset for Passive-Aggressive classi er was
found to be 82.89%.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Test and Results</title>
      <p>Test Dataset was released on much later date and our nal model was tested on
it. Test Dataset provided by organizers consisted Facebook comments for various
Indian Languages.</p>
      <p>On test set1 accuracy achieved was 41.4% while accuracy on test set2 which
was released on a later date accuracy achieved was 31.9%. Accuracy is much
lower than that achieved during training due to lack of large training dataset
due to which model was not able to extract useful patterns of di erent languages
e ciently.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>I would like to express my special thanks to Soumil Mandal for his guidance and
constant supervision as well as providing necessary information. Also I would like
to extend my gratitude towards Team WebArch for providing this opportunity.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Anand</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Barathi</given-names>
            <surname>Ganesh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.B.</given-names>
            ,
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Soman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.P.</given-names>
            ,
            <surname>Rosso</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <article-title>Overview of the INLI PAN at FIRE-2017 track on Indian native language identi cation (</article-title>
          <year>2017</year>
          ) CEUR Workshop Proceedings,
          <year>2036</year>
          , pp.
          <fpage>99</fpage>
          -
          <lpage>105</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Shervin</given-names>
            <surname>Malmasi</surname>
          </string-name>
          , Keelan Evanini, Aoife Cahill, Joel Tetreault, Robert Pugh, Christopher Hamill, Diane Napolitano and
          <string-name>
            <given-names>Yao</given-names>
            <surname>Qian</surname>
          </string-name>
          .
          <source>A Report on the 2017 Native Language Identi cation Shared Task.</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Shervin</given-names>
            <surname>Malmasi</surname>
          </string-name>
          et al.
          <year>2016</year>
          .
          <article-title>Native language identi cation: explorations and applications</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Shervin</given-names>
            <surname>Malmasi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Mark</given-names>
            <surname>Dras</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Native Language Identi cation using Stacked Generalization</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Scott</given-names>
            <surname>Jarvis</surname>
          </string-name>
          , Yves Bestgen, and
          <string-name>
            <given-names>Steve</given-names>
            <surname>Pepper</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Maximizing Classi cation Accuracy in Native Language Identi cation</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Oren</given-names>
            <surname>Tsur</surname>
          </string-name>
          and
          <string-name>
            <given-names>Ari</given-names>
            <surname>Rappoport</surname>
          </string-name>
          .
          <year>2007</year>
          .
          <article-title>Using Classi er Features for Studying the E ect of Native Language on the Choice of Written Second Language Words</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Benjamin</given-names>
            <surname>Swanson</surname>
          </string-name>
          and
          <string-name>
            <given-names>Eugene</given-names>
            <surname>Charniak</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>Native Language Detection with Tree Substitution Grammars</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Sze-Meng Jojo</surname>
            Wong and
            <given-names>Mark</given-names>
          </string-name>
          <string-name>
            <surname>Dras</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Exploiting Parse Structures for Native Language Identi cation. &lt;aman304gupta@gmail</article-title>
          .com&gt;
          <fpage>2018</fpage>
          -
          <lpage>10</lpage>
          -25T14:
          <fpage>49</fpage>
          :
          <fpage>57</fpage>
          .338Z:
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>