<!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>Representation of Target Classes for Text Classification - AMRITA_CEN_NLP@RusProfiling PAN 2017</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Barathi Ganesh HB</string-name>
          <email>barathiganesh.hb@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Reshma U</string-name>
          <email>reshma.anata@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anand Kumar M</string-name>
          <email>m_anandkumar@cb.amrita.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Soman KP</string-name>
          <email>soman_kp@amrita.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Author Profiling</institution>
          ,
          <addr-line>Class Representation, Russian Language, Text Representation, Text Classification</addr-line>
          ,
          <institution>Vector Space Models, Vector Space Models of Semantics</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Center for Computational Engineering and Networking Amrita University Coimbatore</institution>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This working note describes the system we used while participating in RusProfiling PAN 2017 shared task. The objective of the task is to identify the gender trait of the author from the author's text written in the Russian Language. Taking this as a binary text classification problem, we have experimented to develop a representation scheme for target classes (called class vectors) from the texts belonging to the corresponding target classes. These class vectors are computed from the traditional representation methods available in Vector Space Models and Vector Space Models of Semantics. Followed by the representation, Support Vector Machine with a linear kernel is used to perform the final classification. For this task, genre independent corpus is provided by the RusProfiling PAN 2017 shared task organizers. This proposed model attains almost equal performance across all the genre available in the test corpus.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>CCS CONCEPTS</title>
      <p>• Computing methodologies → Natural language
processing; Feature selection;</p>
    </sec>
    <sec id="sec-2">
      <title>INTRODUCTION</title>
      <p>
        Prediction of author’s traits (gender, age, native language and
personality traits) from their texts is known as author profiling and its
applications in targeted internet advertising, forensic science and
consumer behaviour analysis induces the researchers1, 2, 3 and
the industries4 to develop a reliable author profiling systems. The
growth of digital text shared in social media (Facebook, Twitter)
feeds the researchers with the required corpus to develop the author
profiling systems and its related shared tasks to build the state of
art systems [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4–6</xref>
        ].
      </p>
      <p>
        Unlike other text classification problems which identify the
context, here more than identifying the context shared by the author,
identifying the style used to share the content by the author is more
relevant [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. The general text classification works by stacking
1http://pan.webis.de/clef17/pan17-web/author-profiling.html
2http://nlp.amrita.edu:8080/INLI/Test.html
3https://sites.google.com/site/nlisharedtask/home
4https://personality-insights-livedemo.mybluemix.net/
the text representation followed by the feature learning and
classiifcation. The text representation is a pivotal task that has a direct
proportion with the performance of the system.
      </p>
      <p>By considering the above discussed points, we have
experimented to develop a representation scheme for target classes, which
is termed in this paper as class vectors. On successive
representation of texts using the methods available in Vector Space Models
(Document-Term Matrix and Term Frequency - Inverse Document
Frequency) and Vector Space Models of Semantics (Document-Term
Matrix with Singular Value Decomposition and Term
FrequencyInverse Document Matrix with Singular Value Decomposition), we
summed the text vectors in the respective Target classes to form
the class vectors. Later, the variation between the class vectors and
the text vectors are computed through the distance and
correlation measures. These measures are taken as the features and fed to
the Support Vector Machine with a linear kernel to make the final
prediction. The experimented model s given in Figure 1.</p>
      <p>The objective of the task is detailed in Section 2; statistics about
the corpus are given in Section 3; underlying components for
computing class vectors, feature learning, and classification method are
explained in Section 4; cross-validation reports, results reported by
the shared task organizers and observations about the results are
detailed in Section 5.</p>
    </sec>
    <sec id="sec-3">
      <title>TASK DESCRIPTION</title>
      <p>Given the training corpus which consists of author’s text tagged
with the author’s gender information, the objective is to predict
the gender information for the author’s text available in the test
corpus5. In the below given equation taд ϵ {male, f emale } and n
represents the total number of author’s text in the corpus.
train_corpus = {(text1, taд1), (text2, taд1), ..., (textn , taдn )} (1)
test _corpus = {text1, text2, ..., text _n}
(2)
3</p>
    </sec>
    <sec id="sec-4">
      <title>CORPUS STATISTICS</title>
      <p>
        For this task, the corpus has been provided by the RusProfiling
PAN 2017 shared task organizers [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The number of author’s text
(n) in the corpus is given in Table 1. In the given corpus Tweets
are taken as author’s text for training (Train), ofline texts (picture
descriptions, letter to a friend etc.) from RusPersonality Corpus
taken for Test1, comments from Facebook are taken for Test2,
tweets from Twitter taken for Test3, author’s text from product
and service online reviews taken for Test4 and author’s text from
Gender imitation corpus taken for Test5 (women imitating men
and the other way around).
4
      </p>
    </sec>
    <sec id="sec-5">
      <title>REPRESENTATION</title>
      <p>Text representation is the task of transforming the unstructured
texts into its equivalent numerical representation. On successive
representation, further mathematical computation will be applied
to it.
4.1</p>
    </sec>
    <sec id="sec-6">
      <title>Author Representation</title>
      <p>
        4.1.1 Vector Space Models. Document-Term Matrix (DTM) is
a basic representation method, which accounts the count of the
unique word’s present in the document [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The reweighing scheme
introduced along with the DTM to handle the uninformative words
through the inverse document frequency in Term Frequency-Inverse
Document Frequency Matrix (TF-IDF) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. These both methods are
from Vector Space Models (VSM) and represented as follows,
      </p>
      <p>Dnd×tmm = dtm(train_corpus | test _corpus)</p>
      <p>Dntf×imd f = t f id f (train_corpus | test _corpus) (4)
In the above equation, n represents the number of author’s text
and m represents the number of unique words in the vocabulary.
Unique words from the train and test corpus are used to build the
common vocabulary.</p>
      <p>
        4.1.2 Vector Space Models of Semantics. Singular Value
Decomposition applied to the matrix from VSM to get the semantic
representation of the author’s text. Applying matrix factorization on top
of the matrix from the VSM is known as Vector Space Models of
Semantics (VSMs) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This is represented as,
      </p>
      <p>Und×tmn Σn×mVmT ×m = svd Dnd×tmm</p>
      <p>Unt ×find f Σn×mVmT ×m = svd Dntf×imd f (6)
In the above equation, U represents the basis vector representation
of the author’s text and it is used while computing class vectors,
5http://en.rusprofilinglab.ru/rusprofiling-at-pan/
σ represents the singular values (significance of topics) in the
descending order and V represents the basis vector representation of
the words in the vocabulary. In this work, we have not performed
the dimensionality reduction.
4.2</p>
    </sec>
    <sec id="sec-7">
      <title>Target Class Representation</title>
      <p>On the successive computation of Ddtm , Dntf×imd f , Und×tmn and Unt ×find f ,
n×m
the class vectors are computed by summing the respective vectors
of the author’s text belongs to the classes male and female. It is
given as follows for computing class vectors from VSM,
i=1</p>
      <p>n
C1m×aml e = Õ vsm_representation [i, :] i f taдi = male
i=1
n
C1f×emmal e = Õ vsm_representation [i, :] i f taдi = f emale
vsm_representation ϵ nDnd×tmm , Dt f id f o
n×m
Similarly, class vectors from VSMs are computed as follows,
n
C1m×anl e = Õ vsms_representation [i, :] i f taдi = male
i=1
n
C1f×enmal e = Õ vsms_representation [i, :] i f taдi = f emale (11)
i=1
vsms_representation ϵ nUnd×tmn , Unt ×find f o
4.3</p>
    </sec>
    <sec id="sec-8">
      <title>Feature Learning</title>
      <p>The variation between the classes and the author’s texts are
computed by measuring the distance and correlation between the class
vectors (male and female) and the vector representation of the
author’s text. We have considered correlation, cosine distance and
Euclidean distance for measuring variation. This is given as follows,
(3)
(5)
(7)
(8)
(9)
(10)
(12)
(13)
(14)
(15)
(16)
Fn×6 = f eature_learn representation, Cmal e , Cf emal e
representation ϵ nDndt×mm , Dntf×imd f , Und×tmn , Unt ×find f o</p>
      <sec id="sec-8-1">
        <title>Cmal e ϵ nC1m×aml e , C1m×anl e o</title>
      </sec>
      <sec id="sec-8-2">
        <title>Cf emal e ϵ nCf emal e , C1f×enmal e o</title>
        <p>1×m
5</p>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>EXPERIMENTS AND OBSERVATIONS</title>
      <p>From the given corpus, the author’s texts are represented as the
matrix as shown in Section 4.1. For DTM and TF-IDF
representation, the CountVectorizer6 and Tfidf Vectorizer 7 modules from
scikit-learn python library are used. SVD applied on this computed
matrices and the basis matrices (U ) alone are kept for further
processing. SVD performed by using the numpy python library8.</p>
      <p>As given in Section 4.2, the class vectors are computed from the
author’s text vectors. As given in Section 4.3, the feature matrix
6http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.
CountVectorizer.html
7http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.
TfidfVectorizer.html
8https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.linalg.
svd.html</p>
      <sec id="sec-9-1">
        <title>Corpus</title>
      </sec>
      <sec id="sec-9-2">
        <title>Total # authors</title>
      </sec>
      <sec id="sec-9-3">
        <title>Corpus/ Run Run1 Run2</title>
        <p>Run3
Run4
Run5</p>
      </sec>
      <sec id="sec-9-4">
        <title>Tweets</title>
      </sec>
      <sec id="sec-9-5">
        <title>Ofline</title>
      </sec>
      <sec id="sec-9-6">
        <title>Facebook</title>
      </sec>
      <sec id="sec-9-7">
        <title>Tweets</title>
      </sec>
      <sec id="sec-9-8">
        <title>Reviews Imitation</title>
        <p>600
370
228
400
776
94</p>
      </sec>
      <sec id="sec-9-9">
        <title>Ofline</title>
      </sec>
      <sec id="sec-9-10">
        <title>Facebook</title>
      </sec>
      <sec id="sec-9-11">
        <title>Tweets</title>
      </sec>
      <sec id="sec-9-12">
        <title>Reviews Imitation</title>
        <p>computed by measuring the variation between the author’s text
vectors and class vectors. The scipy python library used to compute
the cosine distance, Euclidean distance, and correlation measures.</p>
        <p>The computed feature matrix along with the target classes fed to
SVM with a linear kernel to perform the final classification. SVM
from the scikit-learn python library9 used for classification. In order
to observe the training performance, we have computed the 10-fold
cross validation score and given in Table 2 (Train CV). This is given
as follows,</p>
        <p>Accuracy =
correctly predicted short texts
total # short texts</p>
        <p>(17)
Íi1=01 Accuracyi
T rain CV = (18)
10
Similar to the training corpus, the feature matrix computed for the
ifve test corpus given by the shared task organizers and prediction
for the author’s texts are found by using the model built in the
training period. We have totally submitted the five runs and those
details are given below,
• Run1: TFIDF -&gt; Class Vectors -&gt; Feature Learning -&gt;
Classiifcation
• Run2: DTM -&gt; Class Vectors -&gt; Feature Learning -&gt;
Classification
• Run3: TFIDF -&gt; SVD -&gt; Class Vectors -&gt; Feature Learning -&gt;</p>
        <p>Classification
• Run4: DTM -&gt; SVD -&gt; Class Vectors -&gt; Feature Learning -&gt;</p>
        <p>Classification
• Run5: DTM -&gt; Classification
The results reported by the shared task organizers for the submitted
ifve runs are given in Table 2. Out of five runs, Run2 performed
better and attained 51.45% as the accuracy measure for the
concatenated test corpus. Run5 attained 47.06% as accuracy measure for
the concatenated test corpus and this ensures that class embedding
enhanced the accuracy by 4%.</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>6 CONCLUSION</title>
      <p>The given train corpus and the test corpus are represented as the
author’s text vectors by using methods available in Vector Space</p>
      <p>Model and Vectors Space Models of Semantics. Class vectors are
computed from the author’s text vectors and variation between the
class vector and the author’s text vectors are taken as the features
to perform the Support Vector Machine based classification. The
preliminary results showed that class vectors based classification
improve the accuracy by nearly 4% for the final concatenated test
corpus. There has been a large performance variation between the
cross-validation score and the score against test corpus. Hence
our future work will be focused more on reducing this margin
and computing the class vectors though distributed representation
methods.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Barathi</given-names>
            <surname>Ganesh H. B.</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Anand Kumar</surname>
            , and
            <given-names>K. P.</given-names>
          </string-name>
          <string-name>
            <surname>Soman</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Statistical Semantics in Context Space : Amrita_CEN@Author Profiling</article-title>
          . (
          <year>2016</year>
          ),
          <fpage>881</fpage>
          -
          <lpage>889</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Barathi</given-names>
            <surname>Ganesh H. B.</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Anand Kumar</surname>
            , and
            <given-names>K. P.</given-names>
          </string-name>
          <string-name>
            <surname>Soman</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Vector Space Model as Cognitive Space for Text Classification</article-title>
          .
          <source>CoRR abs/1708</source>
          .06068 (
          <year>2017</year>
          ). arXiv:
          <volume>1708</volume>
          .06068 http://arxiv.org/abs/1708.06068
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Tatiana</given-names>
            <surname>Litvinova</surname>
          </string-name>
          , Francisco Rangel, Paolo Rosso, Pavel Seredin, and Olga Litvinova. [n. d.].
          <article-title>Overview of the RUSProfiling PAN at FIRE Track on Cross-genre Gender Identification in Russian</article-title>
          .
          <source>In Notebook Papers of FIRE</source>
          <year>2017</year>
          , FIRE-2017, Bangalore, India, December 8-10, CEUR Workshop Proceedings.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <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>
          .
          <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 Innovative Use of NLP for Building Educational Applications</source>
          .
          <fpage>62</fpage>
          -
          <lpage>75</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Francisco</given-names>
            <surname>Rangel</surname>
          </string-name>
          , Paolo Rosso,
          <string-name>
            <given-names>Martin</given-names>
            <surname>Potthast</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Benno</given-names>
            <surname>Stein</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Overview of the 5th author profiling task at pan 2017: Gender and language variety identification in twitter</article-title>
          .
          <source>Working Notes Papers of the CLEF</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Francisco</given-names>
            <surname>Rangel</surname>
          </string-name>
          , Paolo Rosso, Ben Verhoeven, Walter Daelemans,
          <string-name>
            <given-names>Martin</given-names>
            <surname>Potthast</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Benno</given-names>
            <surname>Stein</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Overview of the 4th author profiling task at PAN 2016: cross-genre evaluations</article-title>
          .
          <source>Working Notes Papers of the CLEF</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Peter</surname>
            <given-names>D</given-names>
          </string-name>
          <string-name>
            <surname>Turney</surname>
            and
            <given-names>Patrick</given-names>
          </string-name>
          <string-name>
            <surname>Pantel</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>From frequency to meaning: Vector space models of semantics</article-title>
          .
          <source>Journal of artificial intelligence research 37</source>
          (
          <year>2010</year>
          ),
          <fpage>141</fpage>
          -
          <lpage>188</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>