<!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>A Model for Style Change Detection at a Glance</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jamal Ahmad Khan</string-name>
          <email>J_Ahmadkhan@Yahoo.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science and Software Engineering, International Islamic University</institution>
          ,
          <addr-line>Islamabad</addr-line>
          ,
          <country country="PK">Pakistan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This year's PAN Author Identification sub-task for style change detection deals with a single question, whether or not a document has multiple authors? To answer this simple question, a simple straightforward and fast approach is proposed in this document. Some basic stylometry analysis techniques e.g. word frequencies (for stop-words and other POS words), punctuations, word pair frequencies and POS pair frequencies. In order to make fast comparison among word windows, a fast comparison model is built that can produce results in a glance. This model showed 65.1% accuracy over evaluation dataset and 63.83% accuracy over training dataset.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Last year’s CLEF PAN [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] challenge for “Style Change Detection”, focused over
finding the boundaries within the documents wherever a style change was detected.
The proposed models [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2, 3, 4</xref>
        ] however showed low accuracies. So, this year’s PAN
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] challenge is to simply detect whether or not a style change exists in a whole
document. In order to answer that question, one must go through the full document
with a handful of stylometry techniques. Documents in provided datasets may have
zero to more number of textual chunks by different authors on same topic. Hence
answering a simple question may take as much effort as finding the boundaries of
style changes within a document. But this time one has to quit search for style
changes wherever the detection model finds a change and mark the document as
stylistically changed.
      </p>
      <p>
        A model is presented that can detect stylometry changes in documents, in a way
like some skilled human reader may normally detect in a glance [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Detailed
methodology is explained in following sections.
      </p>
    </sec>
    <sec id="sec-2">
      <title>1.1 Related Work</title>
      <p>
        Let’s have a review of previously used techniques for the task of intrinsic
plagiarism detection. The authors [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] modeled a plagiarism detection method relying
over text sentence features and outlier detection for stylistic feature changes. In
another approach Bensalem et al [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] proposed a new text representation of whole
documents using n-gram classes, where each n-gram class was based over least and
most frequent words. In another approach the author [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] used a set of 36 text features
to train her binary classifier for detection of plagiarized and non-plagiarized passages
in documents.
      </p>
    </sec>
    <sec id="sec-3">
      <title>2 Dataset</title>
      <p>
        The training dataset of PAN at CLEF 2018 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] for “Style Change Detection”
includes a total of 2980 and a separate dataset for evaluation includes 1492 English
documents over different topics. Both datasets included exactly half documents
having a style change and half without any style change. However, the position and
number of style changes for each documents was unknown. As the proposed model
also takes into account the length of documents in terms of sentence counts, the
following table shows documents lengths in both datasets.
      </p>
    </sec>
    <sec id="sec-4">
      <title>3 System Methodology</title>
      <p>In order to detect style changes within a given set of documents in a shorter time
period, only a subset of stylometric features was chosen. Also a “divide and conquer”
strategy for quick processing of each document D was adapted. According to this
document processing strategy, full text of each document will be divided into two or
more sections. Each section will be processed independently from others, and in the
end every two divided text sections will be compared for quick results.</p>
      <p>Following are the processing steps for each document.</p>
      <p>1. Text segmentation into sentences
2. Division of sentences into two or more groups
</p>
      <p>Stylometric analysis for each group
3. Stylometric comparison and Style change calculation
4. Repetition of step 2 on basis of positive or negative results</p>
    </sec>
    <sec id="sec-5">
      <title>3.1 Text Segmentation into Sentences</title>
      <p>A text document in the dataset was segmented into sentences ,………. , ;
where each document D has n number of sentences. These sentences are assigned to
an array A.</p>
      <p>A =
,
,</p>
      <p>…..,
,
i =
(1)
(2)</p>
      <p>Where is the middle sentence of array A index of each sentence and n is the
number of total sentences in any document D. This array A is passed to a function F,
that will perform following steps.</p>
    </sec>
    <sec id="sec-6">
      <title>3.2 Division of Sentences into Two or More Groups</title>
      <p>All sentences in array A are divided into two main sub-arrays
shown in following equations.
, as
=
=
,
,
,
(3)
(4)</p>
      <p>The sentence is shared among both sub-arrays. Next steps involve separate
word and character n-gram based stylometric analysis of both groups.</p>
      <sec id="sec-6-1">
        <title>3.2.1 Favorite Stop Words</title>
        <p>
          A list of fifteen most frequent English stop-words [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] was used to find the
frequency of these words in each group.
        </p>
        <p>FSW = { the, of, and, a, to, in, is, it, that, you, for, have, I, not, on }
(5)</p>
        <p>Let and be the favorite stop-words frequency lists. Following Table
shows an example of FSW frequencies in both groups arranged in descending order.
and
and
for
to
to
you
it</p>
        <p>I
I
not
not
…………
…………
it
is</p>
      </sec>
      <sec id="sec-6-2">
        <title>3.2.2 Least Frequent Words</title>
        <p>
          After removing stop-words [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] from both , the sets of 20 least
frequent words are created respectively. The criteria for choosing a least frequent
word simply depends on number of times it appears in each text group.
        </p>
      </sec>
      <sec id="sec-6-3">
        <title>3.2.3 Most Frequent Words</title>
        <p>
          After removing stop-words [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] from both , a set of 20 most
frequent words are created respectively. The criteria for choosing a most frequent
word simply depends on number of times it appears in each text group.
        </p>
      </sec>
      <sec id="sec-6-4">
        <title>3.2.4 Most Frequent Word Pairs</title>
        <p>A sliding window of size of two words and which moves ahead by single word was
used to get sets of 30 most frequent word pairs.</p>
      </sec>
      <sec id="sec-6-5">
        <title>3.2.5 Punctuations</title>
        <p>Punctuations appearing in both text groups
order according to frequency of appearance as
were arranged in descending
respectively.</p>
        <p>The number of stop-words, frequent words and word pairs was chosen and
adjusted after several test runs of algorithm over test dataset. The motive of these
adjustments was to figure out the least possible number of stylometric word n-grams
proposed algorithm’s speed and performance.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>3.3 Stylometric Comparison and Style Change Calculation</title>
      <p>Stylometric match score S among both sentence groups is calculated by using
following formula, where each match among the members of stylometric sets will add
to the final score.</p>
      <p>∑
∑</p>
      <p>(6)</p>
      <p>S = S1 + S2
∑ [</p>
      <p>A recursive function F is used to carryout tasks like text stylometric comparison
and style change detection on the basis of stylometric analysis. The functionality of F
has been described above in the start of section 3.</p>
      <p>The decision to recall F for depends on following condition, where α is
the threshold value for stylometric match and β is the least number of sentences that a
document may contain for next function recall.
if n &lt; and , then F will return true, which means there is no style change in
given document D and false otherwise.</p>
      <p>Following figures will show the two function recalls of F. The arrows in following
figures 1(b) and 2(d) shows the stylometric comparison of one text group with other.</p>
      <p>WWW
WWWWW
XXXXXXX
XXXXXXX
YYYYYYY
YYYYYYY
ZZZZZZZZ
ZZZZZZZZ
Z</p>
      <p>WWW
WWWWW
XXXXXXX
XXXXXXX
YYYYYYY
YYYYYYY
ZZZZZZZZ
ZZZZZZZZ
Z
(b)
(d)
(9)</p>
      <p>WWW
WWWWW
XXXXXXX
XXXXXXX
YYYYYYY
YYYYYYY
ZZZZZZZZ
ZZZZZZZZ
Z</p>
      <p>WWW
WWWWW
XXXXXXX
XXXXXXX
YYYYYYY
YYYYYYY
ZZZZZZZZ
ZZZZZZZZ</p>
      <p>Z
 
 
and
separately and Style Change
respectively</p>
      <p>If any of the function’s recall returns false, then it will be assumed that the
document has a style change.</p>
      <p>Both α and β were adjusted after a number of experiments were carried out over
Training dataset. After the threshold adjustments the model was ready to be tested
over evaluation dataset. This model showed 65.1% accuracy over evaluation dataset
and 63.83% accuracy over training dataset. The final score of proposed model is
shown in following table.</p>
      <p>The results show a consistent performance of model over all datasets. Also the
model consumes least time from all other models presented in style change task.</p>
    </sec>
    <sec id="sec-8">
      <title>5 Conclusion</title>
      <p>The proposed model was built with one thing in mind, and that was to answer a
simple question without carrying out complex and time consuming methodologies for
style change analysis. This model achieved the first task in sense of least time
consumption but however in terms of accuracy the results remained much lower than
other presented techniques. This could however been improved by introducing more
stylometric markers or via adding further recalls to function F for sub-groups of
sentences.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Tschuggnall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stamatatos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Verhoeven</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daelemans</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Specht</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Overview of the author identification task at PAN2017: style breach detection and author clustering</article-title>
          .
          <source>In Working Notes Papers of the CLEF 2017 Evaluation Labs/Cappellato</source>
          , Linda [edit.]; et al. pp.
          <fpage>1</fpage>
          -
          <lpage>22</lpage>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Karas</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Spiewak</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Sobecki</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>OPI-JSA at CLEF 2017</article-title>
          .
          <article-title>Author Clustering and Style Breach Detection</article-title>
          .
          <source>Working Notes Papers of the CLEF</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Khan</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          :
          <source>Style Breach Detection: An Unsupervised Detection Model. Working Notes Papers of the CLEF</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Safin</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Kuznetsova</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <source>Style Breach Detection with Neural Sentence Embeddings. Working Notes Papers of the CLEF</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Kestemont</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tschugnall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stamatatos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daelemans</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Specht</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Overview of the Author Identification Task at PAN2018: Cross-domain Authorship Attribution and Style Change Detection</article-title>
          . In: Cappellato,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Nie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.Y.</given-names>
            ,
            <surname>Soulier</surname>
          </string-name>
          ,
          <string-name>
            <surname>L</surname>
          </string-name>
          . (eds.)
          <article-title>Working Notes Papers of the CLEF 2018 Evaluation Labs</article-title>
          .
          <source>CEUR Workshop Proceedings, CLEF and CEUR-WS.org (Sep</source>
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ehri</surname>
            ,
            <given-names>L. C.</given-names>
          </string-name>
          :
          <article-title>Learning to read and spell words</article-title>
          .
          <source>Journal of Reading Behavior</source>
          ,
          <volume>19</volume>
          (
          <issue>1</issue>
          ),
          <fpage>5</fpage>
          -
          <lpage>31</lpage>
          (
          <year>1987</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Kuznetsov</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motrenko</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsova</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Strijov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Methods for Intrinsic Plagiarism Detection and Author Diarization</article-title>
          .
          <source>In: CLEF Working Notes</source>
          , pp.
          <fpage>912</fpage>
          -
          <lpage>919</lpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Bensalem</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Chikhi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Intrinsic plagiarism detection using ngram classes</article-title>
          .
          <source>In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP)</source>
          , pp.
          <fpage>1459</fpage>
          -
          <lpage>1464</lpage>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Rahman</surname>
          </string-name>
          , R.:
          <article-title>Information Theoretical and Statistical Features for Intrinsic Plagiarism Detection</article-title>
          .
          <source>In: Proceedings of the 16th Annual Meeting of the Special Interest Group on Discourse and Dialogue</source>
          , pp.
          <fpage>144</fpage>
          -
          <lpage>148</lpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <article-title>Most Common Words in English. Wikipedia, the free encyclopedia</article-title>
          , https://en.wikipedia.org/wiki/Most_common_words_in_English (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Doyle</surname>
            ,
            <given-names>D:</given-names>
          </string-name>
          <string-name>
            <surname>Stopwords. Ranks</surname>
            <given-names>NL</given-names>
          </string-name>
          , https://www.ranks.nl/stopwords (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>