Journal article Open Access

Handling Massive N-Gram Datasets Efficiently

Ermanno Pibiri, Giulio; Venturini, Rossano


JSON-LD (schema.org) Export

{
  "inLanguage": {
    "alternateName": "eng", 
    "@type": "Language", 
    "name": "English"
  }, 
  "description": "<p>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.</p>\n\n<p>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.</p>\n\n<p>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&times; on the total running time of the state-of-the-art approach.</p>", 
  "license": "https://creativecommons.org/licenses/by/4.0/legalcode", 
  "creator": [
    {
      "affiliation": "CNR", 
      "@id": "https://orcid.org/0000-0003-0724-7092", 
      "@type": "Person", 
      "name": "Ermanno Pibiri, Giulio"
    }, 
    {
      "affiliation": "CNR", 
      "@id": "https://orcid.org/0000-0002-9830-3936", 
      "@type": "Person", 
      "name": "Venturini, Rossano"
    }
  ], 
  "headline": "Handling Massive N-Gram Datasets Efficiently", 
  "image": "https://zenodo.org/static/img/logos/zenodo-gradient-round.svg", 
  "datePublished": "2018-06-25", 
  "url": "https://zenodo.org/record/3257995", 
  "version": "1.0 | Final", 
  "keywords": [
    "satellite values; Kneser-Ney language models; n-grams"
  ], 
  "@context": "https://schema.org/", 
  "identifier": "https://doi.org/10.5281/zenodo.3257995", 
  "@id": "https://doi.org/10.5281/zenodo.3257995", 
  "@type": "ScholarlyArticle", 
  "name": "Handling Massive N-Gram Datasets Efficiently"
}
26
42
views
downloads
All versions This version
Views 2626
Downloads 4242
Data volume 126.5 MB126.5 MB
Unique views 2626
Unique downloads 4141

Share

Cite as