<!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>CEUR Workshop Proceedings</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.18287/1613-0073-2016-1638-857-863</article-id>
      <title-group>
        <article-title>AUTOMATED SYSTEM FOR EVALUATION OF TEXTS NATURALNESS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>A.V. Yurasov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>O.A. Degtiareva</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Samara National Research University</institution>
          ,
          <addr-line>Samara</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2016</year>
      </pub-date>
      <volume>1638</volume>
      <fpage>857</fpage>
      <lpage>863</lpage>
      <abstract>
        <p>s of it. The purpose of the research is to study changes of percentage of key words in the texts of an original abstract and an abstract based on statistics calculated using Zipf's first law. It is the authors' opinion that the percentage of key words defined by the user separately for each given text should increase in the target abstract as compared with the original abstract.</p>
      </abstract>
      <kwd-group>
        <kwd>text naturalness</kwd>
        <kwd>Zipf's laws</kwd>
        <kwd>abstract</kwd>
        <kwd>sentence</kwd>
        <kwd>word</kwd>
        <kwd>stemming</kwd>
        <kwd>statistics</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Most texts we encounter in real life are natural. An example of an artificial text is a
text created for web crawlers to improve site’s rank on the search engine results page.
Search engines fight this ‘black’ optimization actively, to the point of excluding such
sites from the search index.</p>
      <p>Zipf's laws describe regularities of frequency distribution of words in a text written in
any natural language. These laws are empirical: they have no strict mathematical
proof and are based on statistical distribution of words in large corpora of texts in
various languages. Nevertheless, their correctness is proven statistically.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Zipf's first law</title>
      <p>
        The Zipf’s first law [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ] correlates notions of word rank and frequency, where
“word frequency” is the number of appearances of a word in a text and “rank” is the
position of a word in the total list of words ranked by frequency. For any text written
by a human, this law is true from the statistical, not mathematical point of view. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
This means that deviations are possible for small texts, but the more words a text
contains, the smaller such deviations are.
      </p>
      <p>Zipf's first law (1) states that the probability of discovery of any word multiplied by
its rank is a constant (C).</p>
      <p>
        C  P r ,
P 
where С is a constant, r is word rank, P is probability of discovery of a given word in
a text. And C coefficient is different for different languages [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In this paper
coefficient for Russian language was used.
      </p>
      <p>Probability P is defined by (2).</p>
      <p>f</p>
      <p>N ,
where P is probability, f is frequency, and N is the total number of words.
(1)
(2)
3</p>
    </sec>
    <sec id="sec-3">
      <title>Stemming algorithm</title>
      <p>
        The first published stemmer was written by Julie Beth Lovins in 1968. A later
stemmer was written by Martin Porter and was published in 1980. This algorithm is
implemented in stemmer [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Some stemmers can be automatically generated with the
specified algorithms [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ].
      </p>
      <p>
        An approximate heuristic process of removing suffices and inflections from a word is
usually called stemmatization [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Stemming often involves removal of derivate
affixes. An affix is a morpheme that is attached to a word root to create new words.
Words in Russian may be very short [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. There are also many particles, conjunctions,
etc. These words fall under the natural ‘stop words’ category. This gives a reason to
create a filter to exclude these words from analysis. In this research, words were
filtered by length. No ideal and recommended numbers of their appearances in texts
were calculated for words that were filtered out. These words did not influence the
process of generating abstracts.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>System operation order</title>
      <p>At the first stage, the system uses the stemming algorithm to flag words and calculates
numbers of their appearances.</p>
      <p>At the second stage, the system uses the generated statistics of numbers of words in
the text to calculate ideal and recommended number of appearances of every word in
y </p>
      <p> b
the text according to (3). According to Zipf’s first law, the chart of words distribution
in a natural text must be approximate to the graph of negative correlation.
a
x</p>
      <p>, (3)
where x is word rank, y is word frequency.</p>
      <p>The least square method was used in the research to find coefficients a and b.
If the ideal value is higher than the current number of appearances of a word in a text,
then the recommended value will be the ideal one rounded down to the nearest whole
number. If the ideal value is less, then the recommended one will be rounded up to the
nearest whole number.</p>
      <p>
        Fig. 1 shows a chart of word distribution in a text. The red line shows initial
rankfrequency distribution of the analyzed document. The green line shows ideal values of
word appearances in the text. According to Zipf’s first law, those are non-integral
values. The blue line shows integral values used for generation of the second abstract.
Next, two abstracts are generated: the first is based on initial numbers of appearances
of words in the text, and the second is based on recommended values of appearances
of words. The abstract generation algorithm is described in detail in [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ]. In both
cases, the abstracts are generated by selection of a specified number of sentences with
the highest weight in order of appearance in the text. Weight of a sentence is the sum
of the number of appearances of its words.
      </p>
      <p>Next, key words characteristic of the analyzed text are chosen. The number of
appearances of these words in generated abstracts is calculated. Next, the statistics is
displayed. An example of the statistics is shown in Fig. 2.
The red column shows the number of appearances of a specific word in the original
abstract. The yellow column shows the number of appearances of the word in the
target abstract generated using new values of appearances of the word in the text.
Fairytales were chosen as objects of research of naturalness of texts because, despite a
relatively small volume, key words appear frequently in them and are different for
every separate fairytale. The key words were: Ivan, Tsar, Koschei, Vasilisa, princess,
etc. These key words were supposed to vividly demonstrate changes in the content of
an abstract after words in the texts were approximated to natural distribution.</p>
      <p>Dependence of the number of key words in abstracts on the size of
abstracts for small texts
However, in long texts, such as “Tale of Cipollino” (Fig. 4), the content of key words
increases correspondingly with the increase of the abstract length. This is mainly due
to increase in appearances of the first three most frequent key words.</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>The paper has reviewed Zipf’s first law on distribution of words in natural texts as
well as an algorithm of stemming used to flag words. The research results on
dependence of key words percentage in abstracts generated on the basis of recommended
number of word appearances in the text were presented. This research allows to
conclude that the application of Zipf’s first law for short texts does not lead to increase of
key words percentage in new abstracts. It is reasonable to apply this law to longer
texts. Also, the work on mitigating the influence of non-informative words on content
of the abstract, such as exclusion of frequent verbs and other parts of speech, should
be continued. The stemming algorithm provides an opportunity to find parts of speech
by specific inflections.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ferrer</surname>
            <given-names>I</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cancho</surname>
            <given-names>R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sole</surname>
            <given-names>RV</given-names>
          </string-name>
          .
          <source>Zipf's Law and Random Texts.Advances in Complex Systems, World Scientific Publishing Co</source>
          ,
          <year>2002</year>
          ;
          <volume>5</volume>
          (
          <issue>1</issue>
          );
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gelbukh</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sidorov</surname>
            <given-names>G</given-names>
          </string-name>
          .
          <source>Zipf and Heaps Laws' Coefficients Depend on Language. Lecture Notes in Computer Science</source>
          , Springer-Verlag GmbH,
          <year>2001</year>
          ;
          <year>2004</year>
          :
          <fpage>332</fpage>
          -
          <lpage>335</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <article-title>Russian stemming algorithm</article-title>
          . URL: http://snowball.tartarus.org/algorithms/russian/ stemmer.
          <source>html (access date 18.02</source>
          .
          <year>2016</year>
          ). [in Russian]
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Fox</surname>
            <given-names>B</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fox</surname>
            <given-names>CJ</given-names>
          </string-name>
          .
          <article-title>Efficient Stemmer Generation</article-title>
          . Information Processing &amp; Management, Elsevier Science Publishing Company, Inc.,
          <year>2002</year>
          ;
          <volume>38</volume>
          (
          <issue>4</issue>
          ):
          <fpage>547</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Silva</surname>
            <given-names>G</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oliveira</surname>
            <given-names>C.</given-names>
          </string-name>
          <article-title>A Lexicon-Based Stemming Procedure</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          , Springer-Verlag GmbH,
          <year>2003</year>
          ;
          <volume>2721</volume>
          :
          <fpage>159</fpage>
          -
          <lpage>166</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Trusov</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <article-title>Construction of thesauruses, classification and thematic categories for finding information in distributed information systems</article-title>
          . URL: http://www.aselibrary.ru /digital_resources
          <source>/journal/irr/irr2725/irr27253027/irr272530273030/irr272530273030303 (access date 18.02</source>
          .
          <year>2016</year>
          ). [in Russian]
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Yatsko</surname>
            <given-names>V</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vishniakov</surname>
            <given-names>T.</given-names>
          </string-name>
          <article-title>Some problems of development of modern automatic text abstracting systems</article-title>
          .
          <source>Scientific and Technical Information. Series 2: Information Processes and Systems</source>
          , Moscow: VINITI RAS,
          <year>2007</year>
          ;
          <volume>9</volume>
          :
          <fpage>7</fpage>
          -
          <lpage>13</lpage>
          . [in Russian]
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>