<!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>Anuj@DPIL-FIRE2016: A Novel Paraphrase Detection Method in Hindi Language using Machine Learning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anuj Saini Sapient Global Markets Gurgaon</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Haryana asaini</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>@sapient.com</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sentence</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Class</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>Every language possesses plausible several interpretations. With the evolution of web, smart devices and social media it has become a challenging task to identify these syntactic or semantic ambiguities. In Natural Language Processing, two statements written using different words having same meaning is termed as paraphrasing. At FIRE 2016, we have worked upon the problem of detecting paraphrases for the given Shared Task DPIL (Detecting Paraphrases in Indian Languages) in Hindi Language specifically. This paper proposed a novel approach to identify if two statements are paraphrased or not using various machine learning algorithms like Random Forest, Support Vector Machine, Gradient Boosting and Gaussian Naïve Bayes on the given training data set of two subtasks. In cross validation experiments, Random Forest leads the other methods in terms of F1-score. The experimental results depicts that our algorithm gives better performance with the ensemble learning method than individual approaches for such classification problem. This can be used in various applications such as question-answering system, document clustering, machine translation, text summarization, plagiarism detection and many more.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        With the plethora of information generated by the web these days,
it is challenging to understand the semantics of different
languages when each language has its own scripts and linguistic
rules. Hindi language is still in its early stage concerning to
natural language processing and applications [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Currently
significant amount of research work has already been done for
English language but there is a huge scope for Hindi language.
Paraphrases are sentences or phrases which conveys the same
meaning using different words [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Paraphrase detection is an
important building block in Natural Language Processing (NLP)
pipeline [
        <xref ref-type="bibr" rid="ref6">8</xref>
        ]. Previously, many researchers have investigated ways
of automatically detecting paraphrases on formal texts [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].Various
state-of-the-art paraphrase identification techniques have been
summarized in an excellent manner by ACL [4]. The objective of
our work is motivated by the shared task of DPIL [
        <xref ref-type="bibr" rid="ref9">11</xref>
        ] organized
by the Forum for Information Retrieval Evaluation (FIRE 2016).
There were two subtasks given for the classification problem.
Subtask 1 is to classify two Hindi sentences into two classes: P
(Paraphrased) or NP (Non-Paraphrased). Subtask 2 is to classify
them into three classes which are P (Paraphrased), SP
(SemiParaphrased) or NP (Non-Paraphrased). For detecting
paraphrases, it is very important to understand the language at an
initial stage. Starting from tokenization, stemming, lemmatization,
stop words, phonetics and POS tags etc. need to be identified
before comparing two texts. And as machine learning algorithms
works on numeric data, so it’s important to convert our textual
data into corresponding numbers known as text vectors. A vector
denotes the numerical representation of text comparison of two
sentences. We have generated a set of vectors for each data point
using first two steps of our proposed approach and trained the
model in the third step to get the results.
      </p>
      <p>The paper has been organized as follows. Section 2 gives the
description of the training dataset provided by the organizing
committee. Section 3 presents the proposed approach for
paraphrase detection. The experimental evaluation has been
carried out in Section 4. Section 5 concludes our research work
followed by acknowledgment and references given in Section 6
and Section 7 respectively.</p>
    </sec>
    <sec id="sec-2">
      <title>2. DATA SET DESCRIPTION</title>
      <p>There were a total of 2500 data points in the training set with 2
classes P and NP to be used for classification in Subtask1,
whereas Subtask 2 had 3 classes and a total of 3500 data points. A
detail distribution of classes and its count for both the tasks is
mentioned in Table1.</p>
      <p>SubTask2
1500
1000
1000
Each data point contains a pID, a unique id for each data point and
two Hindi sentences and their final tagged Class. The initial
analysis of the data surfaced some noise, majorly in NP class. A
few examples of false negatives and false positives have been
identified and listed down in Table 2. Here the examples for class
NP and class P denotes false negatives and false positives
respectively.
HIN2802
HIN2852
HIN3032
HIN0230
HIN2958
इस ककताब में</p>
      <p>इस ककताब में काेंग्रस
रविशंकर</p>
      <p>ने
कहा मुझे
लगता है कक
आईएसआईएस</p>
    </sec>
    <sec id="sec-3">
      <title>3. THE PROPOSED METHOD</title>
      <p>The proposed approach includes three major steps which are text
preprocessing, feature generation and classification model. Text
preprocessing is done in various steps such as tokenization,
stemming, soundex, stop word removal and handling synonyms.
Feature generation involves the creation of five new features
which will be used as an input to the classifier for classification of
NP
NP
NP
P
paraphrases. Classification model includes the model training
using the four machine learning algorithms. All the steps are
described below.</p>
    </sec>
    <sec id="sec-4">
      <title>3.1 Text Preprocessing</title>
      <p>For each data point, the preprocessing steps are as follows:</p>
      <sec id="sec-4-1">
        <title>3.1.1 Text Encoding</title>
        <p>We have encoded the sentences using standard UTF-8 encoding
that handles scripting of Hindi language.</p>
      </sec>
      <sec id="sec-4-2">
        <title>3.1.2 Tokenization</title>
        <p>We have tokenized the sentences into words using NLTK library.</p>
      </sec>
      <sec id="sec-4-3">
        <title>3.1.3 Phonetics Transformation</title>
        <p>
          We have applied custom set of rules for phonetics. The
normalization of phonetics has been done using soundex
algorithm [
          <xref ref-type="bibr" rid="ref7">9</xref>
          ]. It looks for specific characters and replaces them
with their corresponding metaphor characters. For example,
न ् न or ज़
        </p>
        <p>ज</p>
      </sec>
      <sec id="sec-4-4">
        <title>3.1.4 Tokens Stemming</title>
        <p>We have applied some more set of rules for stemming into its
basic form. A set of Hindi suffixes characters were removed to get
normalized Hindi word. For example,
[ोो",ोे",ो",ोु",ोी",िो",ोा"][कर ",ोाओ",िोए",ोाई",ोाए",ने ",नी ",ना ",
ते",ोीों",ती",ता",ोाो",ोाों",ोोो"ं,ोेों"]
[ोाकर ",ोाइए",ोाईं ",ोाया",ोेगी",ोेगा",ोोग"ी,ोोग"े,ोाने ",ोाना ",ोात"े,
ोाती",ोाता",ती"ं,ोाओ"ं,ोाए"ं,ोुओ"ं,ोुएं",ोुआं"]</p>
      </sec>
      <sec id="sec-4-5">
        <title>3.1.5 Stop Words Filtering</title>
        <p>We have removed irrelevant words from the sentences using a
standard list of 164 Hindi Stop words. For example,
[सारा , स,े सो, संग, ह , हुआ, हुई, हुए]</p>
      </sec>
      <sec id="sec-4-6">
        <title>3.1.6 Synonyms Expansion</title>
        <p>We have used Hindi WordNet, an extensive lexical dictionary of
Hindi language having 40K~ synsets, to fetch synonyms for Hindi
words. It was developed by researchers at the Center for Indian
Language Technology, Computer Science and Engineering
Department, IIT Bombay and we have downloaded it from the
mentioned link in [5].</p>
        <p>All the text preprocessing steps have been summarized with
examples in the below Table 3.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>3.2 Feature Generation</title>
      <p>After the preprocessing of sentences following features have been
generated in the form of vectors to be passed as an input to the
classifier.</p>
      <sec id="sec-5-1">
        <title>3.2.1 Common Tokens</title>
        <p>The number of common tokens amongst two sentences is used as
a feature. These tokens have been generated by comparing the
preprocessed tokens after removing the stop words and then
taking intersection of them symbolized as follows.</p>
        <sec id="sec-5-1-1">
          <title>Tokens (sentence1) ∩ Tokens (sentence2)</title>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>3.2.2 Normalized common Tokens</title>
        <p>We have normalized the common tokens generated in the first
feature to compute the proportion of commonality of tokens
between two sentences. The value will be in the range of 0 and
1.It is 0 when there are no common tokens between two sentences
and 1 if all tokens between the two sentences are exactly the
same. Mathematically, It has been calculated by dividing the
common tokens by number of unique tokens in both the sentences
as shown below.</p>
        <sec id="sec-5-2-1">
          <title>Common tokens/Unique Tokens (sent1, sent2)</title>
        </sec>
      </sec>
      <sec id="sec-5-3">
        <title>3.2.3 Common IDF Score</title>
        <p>Sum of IDF scores of common tokens from two sentences is used
as numeric similarity vector.</p>
        <p>ΣIDF score (common tokens)
IDF (Inverse Document Frequency) is defined as inverse of
document frequency which is used to identify the importance of a
token in a given corpus. Represented as:
Here a document is an individual sentence. At first IDF has been
calculated for all tokens and kept for reference. Then during
feature generation process, IDF of common tokens has been
calculated and is used as a feature.</p>
      </sec>
      <sec id="sec-5-4">
        <title>3.2.4 Normalized Common IDF Score</title>
        <p>Here the proportion of IDF score of common tokens between two
sentences is computed for normalization and used as a vector to
model. It gives us normalized common IDF score ranges between
0 to 1 of common tokens. It can be calculated as follows.</p>
        <sec id="sec-5-4-1">
          <title>IDF of Common tokens/</title>
        </sec>
        <sec id="sec-5-4-2">
          <title>Total IDF of Unique tokens (sent1, sent2)</title>
        </sec>
      </sec>
      <sec id="sec-5-5">
        <title>3.2.5 Sentences Length</title>
        <p>It denotes the count of number of tokens in sentence 1 and
sentence 2 as separate columns.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>3.3 Classification Model</title>
      <p>
        Features generated in section 3.2 have been used as training data
to train the classifiers using Python Scikit library. Here, we have
used four popular machine learning algorithms which are random
forest, support vector machine and gradient boosting and
compared their performance. Since, random forest being an
ensemble learning method outperforms the other individual
methods, is implemented by growing many classification trees
and having them “vote” for a final decision according to a
majority role [
        <xref ref-type="bibr" rid="ref4">6</xref>
        ].We have focused on tuning its hyper parameters
to enhance the predictive ability of the model. Key parameters are
as follows:
      </p>
      <sec id="sec-6-1">
        <title>3.3.1 n_estimators</title>
        <p>These are the number of trees that we want to build before having
the vote for the final decision. More the number of trees better the
performance however it also increases the time complexity.</p>
      </sec>
      <sec id="sec-6-2">
        <title>3.3.2 max_depth</title>
        <p>It is the maximum depth of the tree which needs to be tuned.</p>
      </sec>
      <sec id="sec-6-3">
        <title>3.3.3 min_samples_leaf</title>
        <p>These are the minimum number of samples or observations
required in a terminal node of the tree.</p>
      </sec>
      <sec id="sec-6-4">
        <title>3.3.4 min_samples_split</title>
        <p>
          These are the minimum number of samples or observations
needed in a node to be considered for splitting.[
          <xref ref-type="bibr" rid="ref5">7</xref>
          ]
We have selected the best set of hyper parameters for Random
Forest using Grid Search of Scikit which resulted in the following
values n_estimators - 500, max_depth - 10, min_samples_leaf - 4
and min_samples_split – 4 and trained our training data. Overall
training time for model is less than 1 second on quad-core
Machine with 8GB of RAM.
        </p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>4. EXPERIMENTAL RESULTS</title>
      <p>We have used 10 fold cross validation to compute overall
accuracy for the system. In this work three evaluation metrics
have been considered which are precision, recall and f1-score. We
have calculated the values of the evaluation parameters for all of
the four respective algorithms. For the subtask 1 we have got the
overall accuracy of 0.92 with F1 score of 0.94 maximum for
Random Forest algorithm. Detailed performance matrix of the
model is given as below in Table 4 in which we have to predict
for 2 classes.
Subtask 2 which had same problem with 3 classes to predict from.
We have used similar approach and similar features set for
training our model. With 3 classes and larger training set of 3500
data points we have got overall accuracy of 0.85 with 10 cross
folds and a F1 score of 0.91 which is again maximum for Random
forest algorithm. Detailed summary of performance matrix of
subtask2 is given in Table 5.
Following figures gives the summarized view of the performance
of the various machine learning algorithms for both subtasks</p>
    </sec>
    <sec id="sec-8">
      <title>5. CONCLUSION</title>
      <p>
        In this paper we have proposed our novel approach for the
detection of Hindi paraphrases which is a very important building
block of semantic text analysis. Building a question answering
system, document clustering, knowledge extraction, plagiarism
detection, building ontologies etc. are the potential applications
for paraphrase identification in NLP [
        <xref ref-type="bibr" rid="ref8">10</xref>
        ]. After comparing all the
four machine learning algorithms used in our model, random
forest is giving best results with F1 score of 0.94 for subtask1 and
0.91 for subtask2 which can be further improved by using more
robust phonetics and synonyms replacements. One limitation of
our research work is that we have not removed outliers from the
training data which could slightly improve the system
performance. In our future work we will include Part of Speech
tagging in feature generation which plays an important role in
paraphrase detection, as nouns and verbs are key elements for
paraphrasing.
      </p>
    </sec>
    <sec id="sec-9">
      <title>6. ACKNOWLEDGMENTS</title>
      <p>We would like to thank organizers for conducting this shared task
and also building the training data. We also would like to thank
Sapient Corporation for giving us an opportunity to work and
explore the world of text analytics.</p>
    </sec>
    <sec id="sec-10">
      <title>7. REFERENCES</title>
      <p>[4] https://www.aclweb.org/aclwiki/index.php?title=Paraphras
e_Identification_(State_of_the_art)
[5] http://www.cfilt.iitb.ac.in/wordnet/webhwn/downloaderInf
o.php</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Sethi</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agrawal</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Madaan</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>S.K. July</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>A Novel Approach to Paraphrase Hindi Sentences using Natural Language Processing</article-title>
          .
          <source>Indian Journal of Science and Technology</source>
          , Vol
          <volume>9</volume>
          (
          <issue>28</issue>
          ), DOI: 10.17485/ijst/2016/v9i28/98374.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <year>2014</year>
          .
          <article-title>A Graph Based Automatic Plagiarism DetectionTechnique to Handle Artificial Word Reordering and Paraphrasing</article-title>
          . A.
          <string-name>
            <surname>Gelbukh</surname>
          </string-name>
          (Ed.):
          <source>CICLing</source>
          <year>2014</year>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , LNCS 8404, pp.
          <fpage>481</fpage>
          -
          <lpage>494</lpage>
          , Springer-Verlag Berlin Heidelberg
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Callison-Burch</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Dolan</surname>
            ,
            <given-names>W. B.</given-names>
          </string-name>
          <year>2015</year>
          . SemEval
          <article-title>-2015 Task 1: Paraphrase and Semantic Similarity in Twitter (PIT)</article-title>
          ,
          <source>Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval</source>
          <year>2015</year>
          ), pages
          <fpage>1</fpage>
          -
          <lpage>11</lpage>
          , Denver, Colorado, June 4-5, Association for Computational Linguistics
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zeng</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Jiang</surname>
            ,
            <given-names>R.A.</given-names>
          </string-name>
          <year>2009</year>
          .
          <article-title>comparative study of ensemble learning approaches in the classification of breast cancer metastasis</article-title>
          ,
          <source>International Joint Conference on Bioinformatics, Systems Biology and Intelligent Computing</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Banfield</surname>
            ,
            <given-names>E.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Student</surname>
            <given-names>Member</given-names>
          </string-name>
          , IEEE,Lawrence O. Hall, Fellow,
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          ,Kevin W. Bowyer, Fellow, IEEE, and
          <string-name>
            <given-names>W.P.</given-names>
            <surname>Kegelmeyer</surname>
          </string-name>
          , Member, IEEE, JANUARY
          <year>2007</year>
          .
          <article-title>A Comparison of Decision Tree Ensemble Creation Techniques</article-title>
          ,
          <source>IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE</source>
          , VOL.
          <volume>29</volume>
          , NO. 1.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Sundaram</surname>
            , Shanmuga,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anand Kumar</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>Soman</surname>
            ,
            <given-names>K.P.</given-names>
          </string-name>
          <year>2015</year>
          . AMRITA CEN@ SemEval-2015:
          <article-title>Paraphrase Detection for Twitter using Unsupervised Feature Learning with Recursive Autoencoders</article-title>
          .
          <source>SemEval-2015</source>
          (
          <year>2015</year>
          ):
          <fpage>45</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Mahalakshmi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anand</surname>
            <given-names>Kumar</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Soman</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.P.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Paraphrase detection for Tamil language using deep learning algorithm</article-title>
          , (
          <year>2015</year>
          ) International Journal of Applied Engineering Research,
          <volume>10</volume>
          (
          <issue>17</issue>
          ), pp.
          <fpage>13929</fpage>
          -
          <lpage>13934</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Socher</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>E. H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pennin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manning</surname>
            ,
            <given-names>C.D.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Andrew</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Ng</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Dynamic pooling and unfolding recursive autoencoders for paraphrase detection</article-title>
          .
          <source>Advances in Neural Information Processing Systems</source>
          (pp.
          <fpage>801</fpage>
          -
          <lpage>809</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Anand</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Kavirajan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            , and
            <surname>Soman</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. P.</surname>
          </string-name>
          <year>2016</year>
          .
          <article-title>DPIL@FIRE2016: Overview of shared task on Detecting Paraphrases in Indian Languages, Working notes of FIRE 2016 - Forum for Information Retrieval Evaluation, Kolkata</article-title>
          , India, December 7-10, CEUR Workshop Proceedings, CEUR-WS.org.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>