Journal article Open Access

Handling Massive N-Gram Datasets Efficiently

Ermanno Pibiri, Giulio; Venturini, Rossano

MARC21 XML Export

<?xml version='1.0' encoding='UTF-8'?>
<record xmlns="">
  <datafield tag="041" ind1=" " ind2=" ">
    <subfield code="a">eng</subfield>
  <datafield tag="653" ind1=" " ind2=" ">
    <subfield code="a">satellite values; Kneser-Ney language models; n-grams</subfield>
  <controlfield tag="005">20200120152604.0</controlfield>
  <controlfield tag="001">3257995</controlfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">CNR</subfield>
    <subfield code="0">(orcid)0000-0002-9830-3936</subfield>
    <subfield code="a">Venturini, Rossano</subfield>
  <datafield tag="856" ind1="4" ind2=" ">
    <subfield code="s">3012678</subfield>
    <subfield code="z">md5:a49aef92e40ad4d2a76aec69da51a2b3</subfield>
    <subfield code="u"> Massive N-Gram Datasets Efficiently.pdf</subfield>
  <datafield tag="542" ind1=" " ind2=" ">
    <subfield code="l">open</subfield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="c">2018-06-25</subfield>
  <datafield tag="909" ind1="C" ind2="O">
    <subfield code="p">openaire</subfield>
    <subfield code="p">user-bigdatagrapes</subfield>
    <subfield code="o"></subfield>
  <datafield tag="100" ind1=" " ind2=" ">
    <subfield code="u">CNR</subfield>
    <subfield code="0">(orcid)0000-0003-0724-7092</subfield>
    <subfield code="a">Ermanno Pibiri, Giulio</subfield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">Handling Massive N-Gram Datasets Efficiently</subfield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">user-bigdatagrapes</subfield>
  <datafield tag="536" ind1=" " ind2=" ">
    <subfield code="c">780751</subfield>
    <subfield code="a">Big Data to Enable Global Disruption of the Grapevine-powered Industries</subfield>
  <datafield tag="540" ind1=" " ind2=" ">
    <subfield code="u"></subfield>
    <subfield code="a">Creative Commons Attribution 4.0 International</subfield>
  <datafield tag="650" ind1="1" ind2="7">
    <subfield code="a">cc-by</subfield>
    <subfield code="2"></subfield>
  <datafield tag="520" ind1=" " ind2=" ">
    <subfield code="a">&lt;p&gt;This paper deals with the two fundamental problems concerning the handling of large n-gram language models: indexing, that is compressing the n-gram strings and associated satellite data without compromising their retrieval speed; and estimation, that is computing the probability distribution of the strings from a large textual source. Performing these two tasks efficiently is fundamental for several applications in the fields of Information Retrieval, Natural Language Processing and Machine Learning, such as auto-completion in search engines and machine translation.&lt;/p&gt;

&lt;p&gt;Regarding the problem of indexing, we describe compressed, exact and lossless data structures that achieve, at the same time, high space reductions and no time degradation with respect to state-of-the-art solutions and related software packages. In particular, we present a compressed trie data structure in which each word following a context of fixed length k, i.e., its preceding k words, is encoded as an integer whose value is proportional to the number of words that follow such context. Since the number of words following a given context is typically very small in natural languages, we lower the space of representation to compression levels that were never achieved before. Despite the significant savings in space, our technique introduces a negligible penalty at query time. Compared to the state-of-the-art proposals, our data structures outperform all of them for space usage, without compromising their time performance. More precisely, the most space-efficient proposals in the literature, that are both quantized and lossy, are not smaller than our trie data structure and up to 5 times slower. Conversely, we are as fast as the fastest competitor, but also retain an advantage of up to 65% in absolute space.&lt;/p&gt;

&lt;p&gt;Regarding the problem of estimation, we present a novel algorithm for estimating modified Kneser-Ney language models, that have emerged as the de-facto choice for language modeling in both academia and industry, thanks to their relatively low perplexity performance. Estimating such models from large textual sources poses the challenge of devising algorithms that make a parsimonious use of the disk. The state-of-theart algorithm uses three sorting steps in external memory: we show an improved construction that requires only one sorting step thanks to exploiting the properties of the extracted n-gram strings. With an extensive experimental analysis performed on billions of n-grams, we show an average improvement of 4.5&amp;times; on the total running time of the state-of-the-art approach.&lt;/p&gt;</subfield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">doi</subfield>
    <subfield code="i">isVersionOf</subfield>
    <subfield code="a">10.5281/zenodo.3257994</subfield>
  <datafield tag="024" ind1=" " ind2=" ">
    <subfield code="a">10.5281/zenodo.3257995</subfield>
    <subfield code="2">doi</subfield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">publication</subfield>
    <subfield code="b">article</subfield>
All versions This version
Views 2626
Downloads 4242
Data volume 126.5 MB126.5 MB
Unique views 2626
Unique downloads 4141


Cite as