<!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>
      <journal-title-group>
        <journal-title>June</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Sentences and Documents in Native Language Identification</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrea Cimino</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Felice Dell'Orletta</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dominique Brunato</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>name.surnameg@ilc.cnr.it</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <volume>13</volume>
      <issue>2013</issue>
      <fpage>207</fpage>
      <lpage>215</lpage>
      <abstract>
        <p>English. Starting from a wide set of linguistic features, we present the first in depth feature analysis in two different Native Language Identification (NLI) scenarios. We compare the results obtained in a traditional NLI document classification task and in a newly introduced sentence classification task, investigating the different role played by the considered features. Finally, we study the impact of a set of selected features extracted from the sentence classifier in document classification.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Native Language Identification (NLI) is the
research topic aimed at identifying the native
language (L1) of a speaker or a writer based on
his/her language production in a non-native
language (L2). The leading assumption of NLI
research is that speakers with the same L1 exhibit
similar linguistic patterns in their L2 productions
which can be viewed as traces of the L1
interference phenomena. Thanks to the availability
of large-scale benchmark corpora, such as the
TOEFL11 corpus
        <xref ref-type="bibr" rid="ref11 ref2">(Blanchard et al., 2013)</xref>
        , NLI
has been recently gaining attention also in the
NLP community where it is mainly addressed as
a multi-class supervised classification task. This
is the approach followed by the more recent
systems taking part to the last editions of the NLI
Shared Tasks held in 2013
        <xref ref-type="bibr" rid="ref11 ref2">(Tetreault et al., 2013)</xref>
        and 2017
        <xref ref-type="bibr" rid="ref6">(Malmasi et al., 2017)</xref>
        . Typically, these
systems exploit a variety of features encoding the
linguistic structure of L2 text in terms of e.g.
ngrams of characters, words, POS tags, syntactic
constructions. Such features are used as input for
machine learning algorithms, mostly based on
traditional Support Vector Machine (SVM) models.
In addition, rather than using the output of a
single classifier, the most effective approach relies
on ensemble methods based on multiple classifiers
        <xref ref-type="bibr" rid="ref4 ref6 ref8">(Malmasi and Dras, 2017)</xref>
        .
      </p>
      <p>
        In this paper we want to further contribute to
NLI research by focusing the attention on the role
played by different types of linguistic features in
predicting the native language of L2 writers.
Starting from the approach devised by
        <xref ref-type="bibr" rid="ref4 ref5 ref8">(Cimino and
Dell’Orletta, 2017)</xref>
        , which obtained the first
position in the essay track of the 2017 NLI Shared
Task, we carry out a systematic feature selection
analysis to identify which features are more
effective to capture traces of the native language in L2
writings at sentence and document level.
Our Contributions (i) We introduce for the first
time a NLI sentence classification scenario,
reporting the classification results; (ii) We study which
features among a wide set of features contribute
more to the sentence and to the document
classification task; (iii) We investigate the contribution of
features extracted from the sentence classifier in a
stacked sentence-document system.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>The Classifier and Features</title>
      <p>
        In this work, we built a classifier based on SVM
using LIBLINEAR
        <xref ref-type="bibr" rid="ref10">(Rong-En et al., 2008)</xref>
        as
maRaw text features
TOEFL11 essay prompt*
Text length (n. of tokens)
Word length (avg. n. of characters)
Average sentence length and standard deviation*
Character n-grams (up to 8)
Word n-grams (up to 4)
Functional word n-grams (up to 3)
Lemma n-grams (up to 4)
Lexical features
Type/token ratio of the first 100, 200, 300, 400 tokens*
Etymological WordNet features
        <xref ref-type="bibr" rid="ref7">(De Melo, 2014)</xref>
        etymological n-grams (up-to 4)
Morpho–syntactic features
Coarse Part-Of-Speech n-grams (up to 4)
Coarse Part-Of-Speech+Lemma of the following token
n-grams (up to 4)
Syntactic features
Dependency type n-grams (sentence linear order) (up to
4)
Dependency type n-grams (syntactic hierarchical order)
(up to 4)
Dependency subtrees (dependency of a word + the
dependencies to its siblings in the sentence linear order)
chine learning library. The set of documents
described in Section 3 was automatically POS tagged
by the part–of–speech tagger described in
        <xref ref-type="bibr" rid="ref3">(Cimino
and Dell’Orletta, 2016)</xref>
        and dependency–parsed
by DeSR
        <xref ref-type="bibr" rid="ref1">(Attardi et al., 2009)</xref>
        . A wide set of
features was considered in the classification of both
sentences and documents. As shown in Table 1,
they span across multiple levels of linguistic
analysis. These features and the classifier were chosen
since they were used by the 1st ranked
classification system
        <xref ref-type="bibr" rid="ref4 ref5 ref8">(Cimino and Dell’Orletta, 2017)</xref>
        in the
2017 NLI shared task.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Experiments and Results</title>
      <p>
        We carried out two experiments devoted to
classify L2 documents and sentences. The training
and development set distributed in the 2017 NLI
shared task, i.e. the TOEFL11 corpus
        <xref ref-type="bibr" rid="ref11 ref2">(Blanchard
et al., 2013)</xref>
        , was used as training data. It
includes 12,100 documents, corresponding to a
total of 198,334 sentences. The experiments were
tested on the 2017 test set, including 1,100
documents (18,261 sentences).
      </p>
      <p>The obtained macro average F1-scores were:
0.8747 in the document classification task and
0.4035 in the sentence one. As it was expected, the
identification of the L1 of the sentences turned out
as a more complex task than L1 document
classification. Both document and sentence classification
are influenced by the number of words but with
a different impact. Figure 1 shows that the
average performance on sentences is reached for
sentences 21–token long, which corresponds to the
average sentence length for this dataset. As the
sentence length increases, the accuracy increases
as well. Due to the smaller amount of linguistic
evidence, the classification of short sentences is
a more complex task. The performance of
document classification is more stable: the best f–score
is already reached for documents of 200–tokens,
which corresponds to a very short document
compared to the average size of TOEFL11 documents
(330 tokens).</p>
      <p>Figures 2(a) and 2(b) report the confusion
matrices of the two experiments1. As it can be seen,
both for sentences and documents the best
classification performance is obtained for German,
Japanese and Chinese, even though with some
differences in the relative ranking positions, e.g.
German is the top ranked one in the sentence
classification scenario and the 2nd ranked one in the
document classification one, while Japanese is the
best classified L1 in the document experiment and
the 4th ranked one in the sentence classification
scenario. Conversely, we observe differences with
respect to the worst recognized L1s, which are
Turkish, Hindi and Korean in the document
classification task and Arabic, Spanish and Turkish in
the sentence classification one. The two
confusion matrices also reveal a peculiar error
distribution trend: the confusion matrix of the sentence
classification model is much more sparse than the
1Since the number of documents and sentences in the two
experiments is different, in order to make comparable the
values of the two confusion matrices, the sentence classification
values were normalized to 100.
document classification one. This means that for
each considered L1, the errors made by the
sentence classifier are quite similarly distributed over
all possible L1s; instead, errors in the document
classification scenario are much more
prototypical, i.e. the wrong predicted label is assigned to
only one or two L1 candidates, which change
according to the specific L1. This is shown e.g.
by languages belonging to same language
family such as Japanese and Korean which belong to
the same Altaic family. Specifically, in the
document classification scenario Korean is mainly
confused with Japanese (10% of errors). This trend
holds also in the sentence classification
experiment where 17.8% of errors were due to the
confusion of Korean with Japanese and vice versa
(18.2% of errors). Interestingly enough, the most
prototypical errors were also made when contact
languages were concerned. This is for example the
case of Hindi and Telugu: Hindi documents were
mainly confused with Telugu ones (16% of errors)
and Telugu documents with Hindi ones (13% of
errors). Similarly, in the sentence classification
scenario, Hindi sentences were wrongly classified
as Telugu sentences in about 20% of cases and
vice versa. As previously shown by Cimino et
al. (2013), even if these two languages do not
belong to the same family, such classification errors
might originate from a similar linguistic profile
due to language contact phenomena: for instance,
both Hindi and Telugu L1 essays are
characterized by sentences and words of similar length, or
they share similar syntactic structures such e.g.
parse trees of similar depth and embedded
complement chains governed by a nominal head of similar
length.</p>
      <p>The behavior of the two classifiers may suggest
that i) some features could play a different role in
the classification of sentences with respect to
documents and ii) the document classifier can be
improved using features extracted from the output of
a sentence classifier in a stacked configuration. To
investigate these hypotheses, we carried out an
extensive feature selection analysis to study the role
of the features in the two classification scenarios.
3.1</p>
      <p>
        Feature Selection
In the first step of the feature selection process, we
extracted all the features from the training set and
pruned those occurring less than 4 times, obtaining
4,000,000 distinct features both for document
and sentence classification. In the second step, we
ranked the extracted features through the
Recursive Feature Elimination (RFE) algorithm
implemented in the Scikit-learn library
        <xref ref-type="bibr" rid="ref9">(Pedregosa et al.,
2011)</xref>
        using Linear SVM as estimator algorithm.
We dropped 1% of features in each iteration. At
the end of this step we selected the top ranked
features corresponding to 40,000 features both for
the sentence and document tasks. These features
were further re-ranked using the RFE algorithm
(dropping 100 features at each iteration) to allow
a more fine grained analysis.
      </p>
      <p>Figure 3(a) compares the percentage of
different types of features used in the classification of
documents and sentences. As it can be noted,
the document classifier uses more words n-grams,
especially n-grams characters. Instead, morpho–
syntactic and syntactic features are more
effective for sentence classification, and the n-grams
of lemmas even more than 4 times. Figures 3(b),
3(c) and 3(d) show the variation of relevance of
the 40k raw text, morpho-syntactic and syntactic
features grouped in bins of 100 features. The lines
in the charts correspond to the differences between
document and sentence in terms of percentage of
a single type of feature in the bin with respect to
its total distribution in the whole 40k selected
features2. Negative values mean that this distribution
in the bin is higher for sentence classification.</p>
      <p>Among the raw text features (Figure 3(b)),
ngrams of words occur more in the 1st bins of
document classification, while n-grams of characters
and lemma are more relevant in the 1st bins of
sentence classification. The n-grams of coarse parts–
of-speech are equally distributed in the two
rankings, instead both the n-grams of coarse
parts–ofspeech followed by a lemma and the n-grams of
functional words occur more in the 1st bins of
sentence classification (Figure 3(c)). This confirms
the key role played by lemma in sentence
classification.</p>
      <p>
        For what concerns syntactic information
(Figure 3(d)), the features that properly capture
sentence structure (dependency subtree and the
hierarchical syntactic dependencies) are all contained
in the first bins of document classification even if
their total distribution is lower than in the
sentence. This shows that syntactic information is
very relevant also when longer texts are classified
and that this kind of information is not captured by
2Spline interpolation applied for readability purpose.
(a)
(b)
n-grams of words. Feature types with low
number of instances are not reported in these charts.
Among these, etymological n-grams appears in the
first bins both for sentence and document,
confirming the relevance of the etymological
information already proven for NLI document
classification
        <xref ref-type="bibr" rid="ref4 ref8">(Nastase and Strapparava, 2017)</xref>
        . For
sentence classification, it is also relevant sentence
length and word length. Instead, for document,
type/token ratio plays a very important role.
Interestingly, the average sentence length does not
appear in the 40k features; we found instead the
sentence length standard deviation, showing that
what counts more is the variation in length rather
than the average value. Even though not contained
in the first bins, also word and document lengths
and the TOEFL11 essay prompt are in the top 40k
features.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Stacked Classifier</title>
      <p>
        The different role of the features in the two L1
classification tasks suggests that we may improve
the traditional NLI document classification by
combining sentence and document classifiers. We
thus evaluated and extended the stacked
sentencedocument architecture proposed by
        <xref ref-type="bibr" rid="ref4 ref5 ref8">(Cimino and
Dell’Orletta, 2017)</xref>
        . In addition to the linguistic
features, they proposed a stacked system using the
L1 predictions of a pre–trained sentence classifier
to train a document classifier. Thus we run several
experiments on the NLI Shared Task 2017 test set
to assess i) the importance of the sentence
classifier in a stacked sentence-document architecture
and ii) which features extracted from the
predictions of the L1 sentence classifier maximize the
accuracy of the stacked system. The sentence
classifier assigned a confidence score for each L1 to
each sentence of the documents. Based on the
confidence score, we defined the following features:
for each L1 i) the mean sentence confidence (avg),
ii) the standard deviation of confidences (stddev),
iii) the product of the confidences (prod), iv) the
top–3 highest and lowest confidence values (top–3
max-min). The last two features were introduced
to mitigate the effect of spike values that may be
introduced by considering the max-min L1
confidences used in
        <xref ref-type="bibr" rid="ref4 ref5 ref8">(Cimino and Dell’Orletta, 2017)</xref>
        .
The first row of Table 2 reports the result obtained
by
        <xref ref-type="bibr" rid="ref4 ref5 ref8">(Cimino and Dell’Orletta, 2017)</xref>
        by the stacked
classifier on the same test set. The second row
reports the results of our document system which
does not use features extracted from the sentence
classifier. The third row reports the result of a
classifier that uses only the features extracted from the
predictions of the L1 sentence classifier. The
following rows report the contribution of each
sentence classifier feature in the stacked architecture
showing an improvement (with the exception of
the product) with respect to the base classifier.
The top–3 highest and lowest confidence values
are the most helpful features in a stacked
architecture. The best result is obtained when using all the
sentence classifier features in the base classifier,
which is the state-of-the-art on the 2017 NLI test
set.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>We introduced a new NLI scenario focused on
sentence classification. Compared to document
classification we obtained different results in terms
of accuracy and distribution of errors across the
L1s. We showed the different role played by a</p>
      <p>Model
Cimino and Dell’Orletta (2017)
Base classifier
Sentence features
Base class. + avg
Base class. + stddev
Base class. + prod
Base class. + top–3 max-min
Base class. + all sentence feat.
wide set of linguistic features in the two NLI
scenarios. These differences may justify the
performance boost we achieved with a stacked
sentencedocument system. We also assessed which
features extracted from the sentence classifier
maximizes NLI document classification.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Aknowledgments</title>
      <p>The work presented in this paper was
partially supported by the 2–year project
(20182020) SchoolChain – Soluzioni innovative per
la creazione, la certificazione, il riuso e la
condivisione di unita` didattiche digitali all’interno
del sistema Scuola, funded by Regione Toscana
(BANDO POR FESR 2014-2020).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Giuseppe</given-names>
            <surname>Attardi</surname>
          </string-name>
          , Felice Dell'Orletta,
          <string-name>
            <given-names>Maria</given-names>
            <surname>Simi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Joseph</given-names>
            <surname>Turian</surname>
          </string-name>
          .
          <year>2009</year>
          .
          <article-title>Accurate dependency parsing with a stacked multilayer perceptron</article-title>
          .
          <source>In Proceedings of the 2nd Workshop of Evalita</source>
          <year>2009</year>
          . December, Reggio Emilia, Italy.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Daniel</given-names>
            <surname>Blanchard</surname>
          </string-name>
          , Joel Tetreault, Derrick Higgins, Aoife Cahill, and
          <string-name>
            <given-names>Martin</given-names>
            <surname>Chodorow</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>TOEFL11: A Corpus of Non-Native English</article-title>
          .
          <source>Technical report</source>
          , Educational Testing Service.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Cimino and Felice Dell'Orletta</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Building the state-of-the-art in POS tagging of italian tweets</article-title>
          .
          <source>In Proceedings of Third Italian Conference on Computational Linguistics</source>
          (CLiC-it
          <year>2016</year>
          ) &amp;
          <article-title>Fifth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian</article-title>
          . Final Workshop (EVALITA),
          <source>December 5-7.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Cimino and Felice Dell'Orletta</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Stacked sentence-document classifier approach for improving native language identification</article-title>
          .
          <source>In Proceedings of the 12th Workshop on Innovative Use of NLP for Building Educational Applications, BEA@EMNLP</source>
          <year>2017</year>
          ,
          <article-title>September 8</article-title>
          , pages
          <fpage>430</fpage>
          -
          <lpage>437</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Cimino</surname>
          </string-name>
          , Felice Dell'Orletta,
          <string-name>
            <given-names>Giulia</given-names>
            <surname>Venturi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Simonetta</given-names>
            <surname>Montemagni</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Linguistic Profiling based on General-purpose Features Shervin Malmasi</article-title>
          and
          <string-name>
            <given-names>Mark</given-names>
            <surname>Dras</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Native Language Identification using Stacked Generalization</article-title>
          .
          <source>arXiv preprint arXiv:1703</source>
          .
          <fpage>06541</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>Shervin</given-names>
            <surname>Malmasi</surname>
          </string-name>
          , Keelan Evanini, Aoife Cahill, Joel Tetreault, Robert Pugh, Christopher Hamill,
          <source>Diane Napolitano and Yao Qian</source>
          <year>2017</year>
          .
          <article-title>A Report on the 2017 Native Language Identification Shared Task</article-title>
          .
          <source>In Proceedings of the 12th Workshop on Building Educational Applications Using NLP. BEA@EMNLP</source>
          <year>2017</year>
          ,
          <article-title>September 8</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Gerard de Melo</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Etymological Wordnet: Tracing the history of words</article-title>
          .
          <source>In Proceedings of the 9th Language Resources and Evaluation Conference (LREC</source>
          <year>2014</year>
          ), Paris, France. ELRA.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>Vivi</given-names>
            <surname>Nastase</surname>
          </string-name>
          and
          <string-name>
            <given-names>Carlo</given-names>
            <surname>Strapparava</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Word etymology as native language interference</article-title>
          .
          <source>In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing</source>
          , pages
          <fpage>2702</fpage>
          -
          <lpage>2707</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <given-names>F.</given-names>
            <surname>Pedregosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Varoquaux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gramfort</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Michel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Thirion</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Grisel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Blondel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Prettenhofer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Weiss</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Dubourg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vanderplas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Passos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Cournapeau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brucher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Perrot</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Duchesnay</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Scikit-learn: Machine learning in Python</article-title>
          .
          <source>Journal of Machine Learning Research</source>
          ,
          <volume>12</volume>
          :
          <fpage>28252830</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <given-names>Fan</given-names>
            <surname>Rong-En</surname>
          </string-name>
          ,
          <article-title>Chang Kai-Wei, Hsieh Cho-Jui, Wang Xiang-Rui,</article-title>
          and
          <string-name>
            <surname>Lin</surname>
          </string-name>
          Chih-Jen.
          <year>2008</year>
          .
          <article-title>LIBLINEAR: A library for large linear classification</article-title>
          .
          <year>2008</year>
          .
          <article-title>LIBLINEAR: A library for large linear classification</article-title>
          .
          <source>Journal of Machine Learning Research</source>
          ,
          <volume>9</volume>
          :
          <fpage>18711874</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Joel</surname>
            <given-names>Tetreault</given-names>
          </string-name>
          , Daniel Blanchard, and
          <string-name>
            <given-names>Aoife</given-names>
            <surname>Cahill</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>A Report on the First Native Language Identification Shared Task</article-title>
          .
          <source>In Proceedings of the Eighth Workshop on Innovative Use of NLP for Building Educational Applications</source>
          , Atlanta,
          <string-name>
            <surname>GA</surname>
          </string-name>
          , USA. Association for Computational Linguistics.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>