N-grams from the National Library of Norway 2026
- Datasets
- Public access
Publicly available to everyone. Access may still require registration and an API key request, as long as anyone can request such registration and/or API keys.
- Open data
Description
This resource contains n-grams – i.e. uni-, bi- and trigrams – from all books and newspapers that had been digitized at the National Library of Norway as of March 2026. The n-grams have been extracted from material consisting of approximately 685,000 books and 4,720,000 newspapers, amounting to a total of 160 billion tokens (words and punctuation). The file format is UTF-8-encoded JSONL, compressed with the efficient Zstandard algorithm.
Content Keys in the n-gram JSONL files: – first – the first word (in uni-, bi- and trigrams) – second – the second word (in bi- and trigrams) – third – the third word (in trigrams) – lang – the language of the n-gram (only for books, the newspapers have no language classification as yet) – freq – the total frequency of the n-gram in the collection of books and newspapers – counts – a dictionary with raw frequencies for each year totals.json contains aggregated frequencies per year in the book and newspaper corpora. Using them, relative frequencies can be calculated in order to compare frequencies over time, as in NB N-gram. ngram-2026-digibok-metadata.jsonl and ngram-2026-digavis-metadata.jsonl contain simple metadata for the books and newspapers. More extensive metadata can be obtained through Oria or the APIs at https://api.nb.no/.
Data preparation The n-grams were extracted from the full-text databases provided by the DH-lab at the National Library of Norway (https://www.nb.no/dh-lab/). The following frequency cuts were applied:
- unigram (books): total frequency of less than five in the corpus for Norwegian Bokmål, less than two in all other languages. Additionally, the n-gram must appear in more than one year.
- unigram (newspapers): total frequency of less than five in the corpus. Additionally, the n-gram must appear in more than one year.
- bigram (books and newspapers): similar frequency cuts as for unigrams. Additionally, hapax bigrams within one year were removed.
- trigram (books and newspapers): similar frequency cuts as for bigrams. Additionally, hapax trigrams within one year were removed.
License The data are released in the public domain (CC-0).
Distributions1
Nameless distribution- application/zstd , application/json
- application/zstd , application/json
- Description:
- Not provided
- Access URL:
- https://hdl.handle.net/21.11146/108
- Status:
- Not provided
- Direct download:
- API:
- Not provided
- Documentation:
- Not provided
- License:
- Conforms to:
- Not provided
- Rights for use:
- Not provided
APIs providing this dataset0
Similar datasets
| Norwegian Conversation Speech Corpus | Public access | |
| Translation memory from Nynorsk News Press Agency 2022 | Public access | |
| bokselskap.no 2023 | Public access | |
| Målfrid 2021 - Freely Available Documents from Norwegian State Institutions | Public access | |
| Norwegian Parliamentary Speech Corpus 2.0 | Public access |
Distributions1
Nameless distribution- application/zstd , application/json
- application/zstd , application/json
- Description:
- Not provided
- Access URL:
- https://hdl.handle.net/21.11146/108
- Status:
- Not provided
- Direct download:
- API:
- Not provided
- Documentation:
- Not provided
- License:
- Conforms to:
- Not provided
- Rights for use:
- Not provided
APIs providing this dataset0
Contact information
- Contact point:
- Not provided
- Website:
- https://www.nb.no/sprakbanken/
- Email:
- sprakbanken@nb.no
- Telephone:
- Not provided
About the data
- Language:
- Not provided
- Content providers:
- Not provided
- Provenance:
- Not provided
- Update frequency:
- Not provided
- First issued:
This date indicates when the data in this dataset was first released. It may have happened before the dataset was published on data.norge.no.
- March 15, 2026
- Last updated:
- June 15, 2026
- Geographical scope:
- Not provided
- Temporal scope:
- Not provided
- Conforms to:
Reference to an implementation rule or other specification that forms the basis for the dataset.
- Not provided
- Quality annotations:
- Not provided
Applicable legislation
Concepts used in the dataset
References
Fees
About this dataset
- Publisher:
- Nasjonalbiblioteket
- Published:
This date indicates when the dataset was harvested by data.norge.no. It may have been available earlier elsewhere.
- July 1, 2026
- Last updated:
- July 1, 2026
- Landing page:
- Not provided
- Documentation:
- Not provided
- Dataset type:
- Not provided
- Metadata Quality:
Metadata quality is an indicator of how well the datasets are described using metadata.
- Sufficient (47%)
- URI:
Themes
Keywords
Discussions on Datalandsbyen0
What is Datalandsbyen?
Datalandsbyen is our online forum where you can request data, share experiences, and ask for advice related to data sharing and information management.
Resource Description Framework (RDF)All URLs to resources on data.norge.no can provide RDF metadata in various formats, depending on the Accept header sent with the request.
All URLs to resources on data.norge.no can provide RDF metadata in various formats, depending on the Accept header sent with the request.