Journal article Open Access

# Handling Massive N-Gram Datasets Efficiently

Ermanno Pibiri, Giulio; Venturini, Rossano

### DCAT Export

<?xml version='1.0' encoding='utf-8'?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:adms="http://www.w3.org/ns/adms#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:dctype="http://purl.org/dc/dcmitype/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:duv="http://www.w3.org/ns/duv#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:frapo="http://purl.org/cerif/frapo/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:gsp="http://www.opengis.net/ont/geosparql#" xmlns:locn="http://www.w3.org/ns/locn#" xmlns:org="http://www.w3.org/ns/org#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:wdrs="http://www.w3.org/2007/05/powder-s#">
<rdf:type rdf:resource="http://www.w3.org/ns/dcat#Dataset"/>
<dct:type rdf:resource="http://purl.org/dc/dcmitype/Text"/>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">https://doi.org/10.5281/zenodo.3257995</dct:identifier>
<foaf:page rdf:resource="https://doi.org/10.5281/zenodo.3257995"/>
<dct:creator>
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0000-0003-0724-7092</dct:identifier>
<foaf:name>Ermanno Pibiri, Giulio</foaf:name>
<foaf:givenName>Giulio</foaf:givenName>
<foaf:familyName>Ermanno Pibiri</foaf:familyName>
<org:memberOf>
<foaf:Organization>
<foaf:name>CNR</foaf:name>
</foaf:Organization>
</org:memberOf>
</rdf:Description>
</dct:creator>
<dct:creator>
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0000-0002-9830-3936</dct:identifier>
<foaf:name>Venturini, Rossano</foaf:name>
<foaf:givenName>Rossano</foaf:givenName>
<foaf:familyName>Venturini</foaf:familyName>
<org:memberOf>
<foaf:Organization>
<foaf:name>CNR</foaf:name>
</foaf:Organization>
</org:memberOf>
</rdf:Description>
</dct:creator>
<dct:title>Handling Massive N-Gram Datasets Efficiently</dct:title>
<dct:publisher>
<foaf:Agent>
<foaf:name>Zenodo</foaf:name>
</foaf:Agent>
</dct:publisher>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#gYear">2018</dct:issued>
<dcat:keyword>satellite values; Kneser-Ney language models; n-grams</dcat:keyword>
<frapo:isFundedBy rdf:resource="info:eu-repo/grantAgreement/EC/H2020/780751/"/>
<schema:funder>
<foaf:Organization>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">10.13039/501100000780</dct:identifier>
<foaf:name>European Commission</foaf:name>
</foaf:Organization>
</schema:funder>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2018-06-25</dct:issued>
<dct:language rdf:resource="http://publications.europa.eu/resource/authority/language/ENG"/>
<owl:sameAs rdf:resource="https://zenodo.org/record/3257995"/>
<skos:notation rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">https://zenodo.org/record/3257995</skos:notation>
<dct:isVersionOf rdf:resource="https://doi.org/10.5281/zenodo.3257994"/>
<dct:isPartOf rdf:resource="https://zenodo.org/communities/bigdatagrapes"/>
<owl:versionInfo>1.0 | Final</owl:versionInfo>
<dct:description>&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;</dct:description>
<dct:accessRights rdf:resource="http://publications.europa.eu/resource/authority/access-right/PUBLIC"/>
<dct:accessRights>
<rdfs:label>Open Access</rdfs:label>
</dct:RightsStatement>
</dct:accessRights>
<dcat:distribution>
<dcat:Distribution>
<dcat:accessURL rdf:resource="https://doi.org/10.5281/zenodo.3257995"/>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dcat:accessURL>https://doi.org/10.5281/zenodo.3257995</dcat:accessURL>
<dcat:byteSize>3012678</dcat:byteSize>
<dcat:mediaType>application/pdf</dcat:mediaType>
</dcat:Distribution>
</dcat:distribution>
</rdf:Description>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">780751</dct:identifier>
<dct:title>Big Data to Enable Global Disruption of the Grapevine-powered Industries</dct:title>
<frapo:isAwardedBy>
<foaf:Organization>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">10.13039/501100000780</dct:identifier>
<foaf:name>European Commission</foaf:name>
</foaf:Organization>
</frapo:isAwardedBy>
</foaf:Project>
</rdf:RDF>

26
42
views