---
title: "Operationalizing a National Digital Library: The Case for a"
description: "How NB-BERT was trained on Norwegian archival and digital text, and what its evaluations show for Bokmål, Nynorsk and other languages."
canonical: "https://research.elamur.ai/free/en/papers/kummervold-2021-operationalizing-national-digital-library-case/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/kummervold-2021-operationalizing-national-digital-library-case/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Operationalizing a National Digital Library: The Case for a Norwegian Transformer Model

# Operationalizing a National Digital Library: The Case for a Norwegian Transformer Model

Paper · 2021 · Per E Kummervold, Javier De la Rosa, Freddy Wetjen et al.

**Authors:** [Per E Kummervold](https://md.research.elamur.ai/free/en/authors/per-e-kummervold/), [Javier De la Rosa](https://md.research.elamur.ai/free/en/authors/javier-de-la-rosa/), Freddy Wetjen and Svein Arne Brygfjeld · **Year:** 2021 · **Venue:** Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**4** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3152983072) · [Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa)](https://aclanthology.org/volumes/2021.nodalida-main/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.nodalida-main.3/)
- [PDF](https://aclanthology.org/2021.nodalida-main.3.pdf)
- [OpenAlex](https://openalex.org/W3152983072)

Citations: OpenAlex, 2026-10-14.

## Summary

Norwegian has a substantial written record, but much of it sits outside the open web collections ordinarily used to train language technology. Kummervold and colleagues asked whether the National Library of Norway could turn its digitized and born-digital holdings into training material for both Bokmål and Nynorsk. They combined books, newspapers, parliamentary records and other publications with web sources. For scanned material, they used the confidence estimates produced by optical character recognition to remove the least reliable text. They then standardized the text and removed repeated paragraphs. The resulting Colossal Norwegian Corpus contains 18,438M words and occupies 109.1GB after deduplication.

The authors built NB-BERT by continuing the training of multilingual BERT, or mBERT, on this collection. The starting system already covered both Norwegian written varieties and supplied a shared vocabulary and learned parameters. Continued training asked it to recover hidden pieces of text from the words around them. The authors kept the BERT architecture, tested how to train it in large batches and compared schedules that gave different amounts of time to longer passages. They released the trained NB-BERT and the tools and code used in the project. [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)

On the Norwegian test sets, NB-BERT improved on mBERT in identifying names, assigning grammatical categories, recognizing sentiment and predicting the party affiliation of parliamentary speeches. The named-entity recognition results rose from 83.8 to 91.2 micro F1 in Bokmål and from 85.6 to 88.9 in Nynorsk. In the sentence sentiment task, which pooled both written varieties, macro F1 rose from 69.7 to 86.4. The gains in grammatical tagging were smaller, with mBERT already scoring highly. NB-BERT also led the Swedish and Danish named-entity comparisons and tied English-only BERT at 91.3 micro F1 on the English test. The original multilingual system retained the lead on the Spanish and Finnish tests. [Named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/) · [Sentiment and emotion](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/)

The study establishes that a large collection containing imperfect transcriptions can support a strong Norwegian BERT system. It also shows that continued training can improve the target languages while preserving much of the starting system’s performance on selected tasks in other languages. The comparison leaves open how much of the improvement came from corpus size, genre coverage, the training schedule or the optimizer. In particular, the authors did not vary the amount of transcription noise under controlled conditions, so the effect of that noise remains unresolved.

## Deep dive: Operationalizing a National Digital Library: The Case for a Norwegian Transformer Model

How NB-BERT was trained on Norwegian archival and digital text, and what its evaluations show for Bokmål, Nynorsk and other languages. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The gap between published writing and usable training text

The authors begin with a problem of supply. A language can have newspapers, literature, public records and a long history of publication while offering relatively little machine-readable text that researchers can assemble into a training corpus. A corpus is a collection of texts brought together for analysis or training. For the kind of [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) studied here, the corpus supplies examples of words and phrases in context. The range of contexts available depends on what can be collected and prepared, as well as on what has been written.

The paper describes Bokmål and Nynorsk as equally recognized written varieties of Norwegian. Their representation in open resources differs. In the Wikipedia ranking the authors cite, Bokmål appears at number 23 and Nynorsk at number 55. The paper also notes that the number of English Wikipedia pages exceeds the number of Norwegian pages by a factor greater than 100. Page counts give an indication of the availability of an important training source. They do not measure the volume of writing held in archives or the range of settings in which people use either Norwegian variety.

Copyright restricts which Norwegian materials can be made publicly available. In the authors’ account, the public corpus consisted mostly of Wikipedia and online newspapers and amounted to around 5GB, or 818M words. This was a practical constraint on what researchers could collect from public sources. The holdings available through the National Library of Norway included writing from other genres and periods, with access governed by different conditions. The project used that access to investigate what an institution with large digital holdings could do for a language with limited open training text.

The national digitization program, established in 2006, made a substantial portion of the traditional collection available in digital form. Legal deposit also brought in documents that were digital from the start. These routes into the collection left the authors with different kinds of input. A born-digital document may already contain machine-readable characters. For a scan, the system has to infer those characters from a page image. This process, optical character recognition or OCR, produces a transcription whose quality varies with the material and how it was digitized.

The preservation and training tasks also require different representations. A preservation copy can retain information about a page and its layout. A training system needs sequences of text in a consistent encoding that it can turn into tokens. Preparing a corpus therefore meant deciding which material was usable, extracting text from preservation files and combining it with sources acquired in other formats. Corpus construction was a substantial part of the research question because digitization alone left those decisions unresolved.

#### From word vectors to multilingual BERT

The paper situates its work in a succession of Norwegian and Nordic efforts to learn numerical representations from text. Before transformers, prominent approaches used [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), numerical vectors that summarize patterns in how words occur. The University of Oslo’s Language Technology Group had gathered monolingual resources through a Nordic collaboration and used them to release vectors trained with word2vec and fastText. The paper describes these as non-contextual approaches. A learned representation for a word is reused across occurrences, leaving any interpretation of its immediate context to a surrounding system. [word2vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/) · [fastText](https://md.research.elamur.ai/free/en/papers/bojanowski-2017-enriching-word-vectors-subword-information/)

The same research effort also produced contextual representations using ELMo. A contextual representation can change from one occurrence of a word to another as the surrounding text changes. That property matters when a form plays different grammatical roles or has different meanings across sentences. BERT continued the move towards contextual representations with a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), an architecture that uses attention to relate positions in a sequence. The Norwegian study adopted this architecture and concentrated its changes on the supply of text and the continuation of training. [ELMo](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/) · [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/)

The original English BERT supplied one comparison for corpus scale. The paper gives its training collection as 16GB of uncompressed text, or 3,300M words. It also discusses RoBERTa, whose reported collection reached 160GB and whose approach yielded better performance. These examples explain why the authors took corpus size seriously. The resources available for Norwegian through the public routes they describe were much smaller than the collections used in these English projects. [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/)

Multilingual BERT offered another route. With training across 104 languages, mainly on Wikipedia, mBERT provided a common starting point for Bokmål, Nynorsk and several other Nordic languages. The paper’s estimates for the Norwegian Wikipedia material are 0.9GB and 140M words for Bokmål, and 0.2GB and 32M words for Nynorsk. Shared training can make patterns learned in one language useful for another, a possibility known as cross-lingual transfer. The authors nonetheless saw reason to ask whether the amount of Norwegian text was sufficient to develop representations comparable in quality to those available for English. That question motivated them to give Norwegian much more exposure while retaining the multilingual starting point. [Multilingual and cross-lingual NLP](https://md.research.elamur.ai/free/en/topics/multilingual-nlp/) · [How Multilingual Is Multilingual BERT?](https://md.research.elamur.ai/free/en/papers/pires-2019-how-multilingual-is-multilingual-bert/) · [Are All Languages Created Equal in Multilingual BERT?](https://md.research.elamur.ai/free/en/papers/wu-2020-are-all-languages-created-equal/)

#### The Nordic precedents

The paper places the project alongside several efforts to train BERT for individual Nordic languages. BotXO listed systems for Norwegian, Danish and Swedish, based largely on Common Crawl text. Its reported corpus sizes were 5GB for Norwegian, 9.5GB for Danish and 24.7GB for Swedish. The authors were unable to get the Norwegian release working. That experience affected the comparisons they could run and left the BotXO work as a precedent for the approach.

The National Library of Sweden provided a closer institutional precedent. Its KBLab trained BERT and ALBERT using roughly 20GB of text. The sources included books, news, government publications, Wikipedia and internet forums. That project illustrated how an institution’s access to publications could complement web sources. The Norwegian study pursued the same opportunity with its own preservation formats, holdings and OCR issues, while making multilingual retention an explicit part of its evaluation. [Playing with Words at the National Library of Sweden](https://md.research.elamur.ai/free/en/papers/malmsten-2020-playing-words-national-library-sweden/)

A contemporary Norwegian effort at the University of Oslo produced NorBERT from around 5GB of Wikipedia and newspaper text. This supplied a useful point of comparison because it shared the goal of improving Norwegian representations while using a different corpus and a monolingual approach. The paper describes the release of NorBERT and NB-BERT as contemporaneous. The two projects made it possible to compare systems developed specifically for Norwegian alongside the original multilingual system. [Large-Scale Contextualised Language Modelling for Norwegian](https://md.research.elamur.ai/free/en/papers/kutuzov-2021-large-scale-contextualised-language-modelling/)

### The method, step by step

#### Decide which holdings to turn into text

The collection begins with publications from both digital preservation and newer digital deposit, supplemented by publicly available sources. The authors found books, periodicals, newspapers and public documents especially useful for their purpose. The list of sources also includes parliamentary proceedings and a legal collection. The inclusion of publications from different periods was deliberate. The authors wanted the trained system to handle old and modern writing and to be useful when passages included a language such as English alongside Norwegian.

Books dominate the corpus inventory. The row for OCR books covers 1814–2020 and records 11,820 million words and 69.0GB of text. Newspaper scans account for 3,350 million words and 20.0GB. The parliamentary documents row, covering 1814–2014, records 809 million words and 5.1GB. These rows indicate how much of the material came from converting published pages into text. They also show why OCR quality could matter at the scale of the whole collection.

The corpus also has substantial digital sources. The Common Crawl OSCAR row contains 799 million words and 4.9GB. The online Bokmål newspapers account for 678 million words and 4.0GB, and the online Nynorsk newspapers for 47 million words and 0.3GB. The Wikipedia rows report 140 million words for Bokmål and 32 million for Nynorsk. These figures describe the corpus inventory by source. They leave open which kinds of material provided the most useful examples for a particular task.

The inventory includes periodicals, newspaper microfilms and public reports processed through OCR, as well as legal material. Those distinctions matter because the condition and format of a source can affect what survives transcription. A newspaper available as an online text and a newspaper recovered from microfilm may both represent journalistic writing. The microfilm transcription also carries whatever errors its recognition process introduced. Source diversity therefore changes the language available for training and the kinds of preparation the text needs.

From preserved publications to a Norwegian BERT The steps in order.

#### Filter scans using evidence from the OCR process

The institution stored digitized materials using METS/ALTO. In this project, the important feature of that format was that the OCR output carried a confidence value for each recognized word. The paper describes a scale with 0 for no confidence and 1 for certainty. The recognition system’s estimate offered a way to inspect a large number of pages automatically. It also gave the authors separate information about the text it recognized and the certainty it assigned to that recognition.

The authors’ practical criterion was whether a person could recover the meaning of a passage. Assessing that directly for every page would have required manual reading at a scale the project could neither use nor afford. The authors instead averaged word confidence scores at the paragraph and page levels. They set a minimum average of 0.8 for paragraphs and 0.9 for pages. These are thresholds on the recognizer’s own estimates. The paper does not give a human transcription error rate corresponding to either threshold.

The paragraph and page checks address different scales of variation. A paragraph score can indicate localized trouble, while a page score summarizes the wider transcription. Confidence was useful only to the extent that the scores tracked actual quality. The authors found that material scanned from the beginning of 2006 through the end of 2008 had weak recognition even when its assigned scores looked favorable. They excluded the text scanned in that period. The dates refer to the processing history. Publications from much earlier periods could still enter through scans made at other times.

Document length supplied another screen. To meet the authors’ requirements, a document had to contain 20 or more words and average six words per paragraph. These filters helped remove material such as cartoons and picture books whose transcriptions yielded little running text. The threshold on the average concerns the document’s paragraphs as a group. Individual short paragraphs could occur in an otherwise qualifying document.

The criteria reflect a choice about how to use the collection. A person can learn something from a sparse page with a short caption, but such a page offers limited continuous context for predicting hidden text. A readable passage with several damaged words may still contain many useful contexts. The authors used the combined checks to keep recoverable writing at scale and accepted that some character and word errors would remain in the retained text.

#### Combine and normalize the sources

Once the scanned material passed the filters, the authors added it to the other digital inputs. They standardized text encoding and the use of special characters. This matters because material gathered under different storage and processing conventions can represent the same text in different ways. A common representation makes it possible for later stages to handle the sources together and to identify repeated paragraphs across the collection.

Deduplication operated at the level of paragraphs. The authors removed duplicate paragraphs across the entire collection rather than confining the check to a particular source. A paragraph is a useful unit when repetition can affect part of a document, even if the rest of the document differs. The reported procedure establishes that duplicated paragraphs were removed. The paper leaves the handling of near-duplicates, including parallel scans with different OCR mistakes, unspecified.

The authors estimated the language mixture using collection metadata and counts of selected word types, including personal pronouns. They give 83% for Bokmål and 12% for Nynorsk. English accounts for close to 4%. They describe the remaining 1% as a mixture that includes Sámi, Danish and Swedish, with traces of other languages. These estimates supplied a basis for grouping the cross-language evaluations. They also put the intended Norwegian specialization in context. The largest categories were Bokmål and Nynorsk, while the smaller categories supplied some direct exposure to other languages.

The result is called the Colossal Norwegian Corpus. Its size and composition describe what was available before the authors selected input sequences for training. At that point, a paragraph is a piece of prepared text. For BERT, the relevant units are vocabulary tokens arranged in sequences. The authors prepared inputs of 128 tokens and 512 tokens. A token is an item recognized by the tokenizer, which divides written text into entries the system can process. A word can correspond to a vocabulary entry or to multiple pieces, so these sequence lengths measure capacity in tokens. [Tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) · [Subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/)

#### Start from mBERT and continue predicting masked text

The authors kept the original BERT architecture and initialized training with mBERT’s learned weights. Weights are the numerical parameters adjusted during training. The starting weights already encoded patterns acquired from multilingual text, including both Norwegian varieties. This choice gave the Norwegian training stage a system that had already learned to use context. It also offered a way to preserve competence in languages that would receive much less attention in the new corpus.

The authors retained mBERT’s vocabulary of 119,547 tokens. Each entry in that vocabulary has an established place in the starting system. Keeping the vocabulary preserved the relationship between the input tokens and the inherited parameters. The practical consequence is that both Norwegian varieties were processed through a vocabulary designed for a much wider set of languages. The paper treats a vocabulary designed specifically for Norwegian as a separate question for future study.

The objective was masked language modeling, abbreviated MLM. A training example supplies a sequence with selected token identities hidden. The system uses the surrounding sequence to predict them and updates its weights based on how well those predictions match the original text. Because the objective derives the expected answer from the sequence itself, the corpus can supply training examples without separate grammatical or semantic labels. The task also makes the usefulness of the two sequence lengths easy to see. A short window provides nearby context. A longer one lets the system draw on more distant text when the relevant clues occur farther away.

The masked-token objective belongs to pretraining, the stage intended to develop representations useful across tasks. The paper examines performance on that objective when comparing training settings, then tests the learned representations by adapting the system to labeled tasks. A system can become better at recovering missing text and vary in how readily the resulting representations support particular labels. The paper therefore treats masked prediction and downstream classification as distinct kinds of evidence. It specifies the objective and settings in prose and gives training schedules, without presenting a mathematical formula for the loss or optimizer.

#### Choose an optimizer and schedule within the hardware budget

A batch is the group of training sequences processed for an update. The learning rate controls the size of the updates. The paper follows earlier work on large-batch BERT training, which had identified instability when high learning rates were combined with large batches under Adam, an optimizer that adapts updates using the history of gradients. Gradients indicate how changes to the parameters would change the training objective. The alternative, LAMB, adapts updates at the level of layers and was proposed for large-batch training. [Large Batch Optimization for Deep Learning](https://md.research.elamur.ai/free/en/papers/you-2019-large-batch-optimization-deep-learning/)

The authors compared Adam and LAMB for 100,000 pretraining steps at a batch size of 2,048 sequences and a learning rate of 4e-4. They report that the comparison confirmed the behavior that motivated the use of LAMB. The general strategy was to use as large a batch as their accelerator could handle and raise the learning rate while training remained stable. They evaluated the learning rate over 100,000 steps and expected the later decay of the rate to help maintain stability. Decay means that the rate falls as a run proceeds. The pretraining accelerator was a v3-8 TPU with 128GB of memory.

Sequence length constrained batch size. A batch of longer sequences used more memory, so the authors reduced the number of sequences per batch for the 512-token inputs. The short-sequence phases in the reported schedule use batches of 2760, and the long-sequence phases use batches of 384. The paper describes the reduction as a factor of roughly 7. Consequently, an update in a long-sequence phase represents fewer examples than an update in a short-sequence phase. Training steps, examples observed and elapsed time measure different aspects of the schedule.

The shared opening schedule starts with a 50k-step warmup on 128-token sequences. The learning rate rises from 0 to 4e-4. The next phase uses 700k steps at the same sequence length, at 4e-4. The subsequent common phase uses 1M steps on 512-token sequences, also at 4e-4. In the prose account, the authors say that the two variants followed the same schedule for their first 1,750,000 steps. Both came from the same mBERT weights.

Version A then used 1.2M steps on 512-token inputs, with the learning rate falling from 4e-4 to 2e-4. It ended with 1.2M steps on 128-token inputs, with the rate falling from 2e-4 to 0. Version B stayed with long inputs for its final 2M steps and brought the rate from 4e-4 to 0. Those phases describe more than a change to the sequence length in a particular batch. They define different endings to training, including whether the system returns to short contexts and how the learning rate decays across the final phases.

The authors describe version A as spending roughly 10% of its training time on long sequences and version B as spending almost 30% that way. For comparison, they describe original BERT as using 128-token inputs for roughly 90% of its training examples and 512-token inputs for 10%. The original BERT proportions concern examples. The descriptions of the Norwegian variants refer to time. The step and batch counts give the clearest account of what the authors ran, while the prose explains their intent to compare the variants under roughly similar overall training time.

#### Adapt the pretrained weights to labeled tasks

The final stage was [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). Here the starting weights come from pretraining, and the system is trained to make the decisions required by a particular dataset. In grammatical tagging, each position needs a category. In sentiment classification, the system makes a decision for the entire sentence. The authors used an in-house machine with a single NVIDIA Quadro RTX6000 with 24GB of memory for evaluation.

The paper describes warmup and decay for this stage as well. Warmup gradually raises the learning rate at the start, and linear decay reduces it to zero over the subsequent steps. For each task, the authors used a validation set to select settings with mBERT. They then transferred the chosen settings to NB-BERT and NorBERT. This gave the comparison a shared procedure and made the downstream tests a measure of how each system performed under it. The selection criterion, the datasets and the scores determine what can be inferred from that comparison.

### Experiments and results

#### A shared procedure for choosing settings

The main comparison involved mBERT, NorBERT and the Norwegian continuation of mBERT. The authors could not obtain usable fine-tuning results with NorBERT release 1.0. They included release 1.1, which had been issued with corrections. The cross-language name recognition experiments also included English-only BERT. The original mBERT is the most direct reference point for asking how performance changed after the authors continued its training. NorBERT offers a comparison with a separate Norwegian training approach. English-only BERT answers a different comparison question, especially on the English test.

The authors ran a small search for fine-tuning settings on mBERT. Candidate learning rates ranged from 2e-5 to 5e-5, and the search considered 3 or 4 epochs. An epoch is a pass through the labeled training data. The authors also investigated the warmup ratio and weight decay, which is a regularization setting in the optimizer. A warmup ratio of 0.1 and weight decay of 0 generally gave their best validation performance. They applied those settings throughout to keep the search small.

For token tasks, they chose settings using micro F1 on the Bokmål validation data, with the seqeval scoring implementation. For sequence tasks, they used macro F1. The selected number of epochs was 3 for every task. The chosen learning rate was 2e-5 for named entities and for political affiliation, and 3e-5 for part-of-speech tagging and for sentiment. After transferring the settings, the authors reported the comparison on the test data. A validation score helps select a configuration, while a test score measures its performance on the held-out benchmark.

F1 combines precision and recall. Precision reflects how many predicted items agree with the reference annotations, and recall reflects how many reference items the system recovers. Micro F1 pools the relevant decisions before calculating the score, giving often occurring items more influence through their counts. Macro F1 calculates scores by class and gives the classes equal weight when averaging. The paper uses micro F1 for token classification and macro F1 for sequence classification. The distinction matters when interpreting the rows together, because the scores summarize different prediction units and different kinds of error.

#### Finding names and grammatical categories

For the Norwegian token tasks, the authors drew on the Norwegian Dependency Treebank and its named-entity extension, NorNE. A [treebank](https://md.research.elamur.ai/free/en/topics/treebanks/) is a collection of sentences annotated with grammatical structure. The Norwegian resource includes annotations for word forms and grammatical features, syntactic functions and hierarchical relations. [Linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/) supplies the reference labels against which predictions can be checked. NorNE adds entity labels to more than 300,000 tokens, providing the basis for the Norwegian named-entity evaluation. [NorNE](https://md.research.elamur.ai/free/en/papers/jorgensen-2020-norne-annotating-named-entities-norwegian/)

Named-entity recognition involves locating the span of a name and assigning its category according to the dataset’s labeling scheme. The system needs enough context to follow the relevant conventions when an expression could be interpreted in different ways. The Norwegian tests score Bokmål and Nynorsk separately. This gives each variety a visible result and allows the comparison with mBERT to be made independently on each set of annotations.

Named entity recognition on the Norwegian NorNE test sets NB-BERT leads the comparison in both written varieties.

**The numbers**

| System or setting | micro F1 |
| --- | --- |
| Bokmål mBERT | 83.8 |
| Bokmål NorBERT | 89.9 |
| Bokmål NB-BERT (this paper) | 91.2 |
| Nynorsk mBERT | 85.6 |
| Nynorsk NorBERT | 86.1 |
| Nynorsk NB-BERT | 88.9 |

On Bokmål, NB-BERT’s 91.2 micro F1 leads NorBERT’s 89.9 and mBERT’s 83.8. The paper reports the difference between NB-BERT and mBERT as +7.4 F1 points on this test. On Nynorsk, NB-BERT scores 88.9, NorBERT scores 86.1 and mBERT scores 85.6. The original multilingual baseline starts higher on Nynorsk than on Bokmål in this task, while NB-BERT finishes higher on Bokmål. The ordering is informative within each benchmark. The two datasets supply their own texts and annotation decisions, so the ordering across varieties gives no general ranking of their difficulty.

[Part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/) assigns a grammatical category, such as noun or verb, to a word in context. On the Bokmål test, micro F1 is 98.3 for mBERT, 98.5 for NorBERT and 98.8 for NB-BERT. On Nynorsk, the corresponding scores are 98.0, 98.4 and 98.8. This is the task on which the authors describe the gain as smallest. The baseline was already strong, and they note that grammatical annotation contains ambiguities that complicate estimates of how high the score can reasonably go.

The two token tasks put different demands on the contextual representations. A grammatical tag identifies the role or type of a word under the treebank’s conventions. A name may extend over several words, and the recognizer must locate its boundaries and give it a type. Gains on both tasks show that the resulting system is useful for more than a single labeling scheme. Their different baselines also explain why the absolute scores and reported changes should be read task by task.

#### Classifying sentiment and parliamentary speeches

For the sentiment task, the authors used a sentence-level adaptation of the fine-grained Norwegian Review Corpus, NoReC. Fine-grained annotation can mark sentiment within parts of a sentence. The study aggregates those judgments to make a classification task at the sentence level. Sentences without sentiment and sentences with conflicting sentiments were removed. The remaining data give the experiment a target that can be scored as one label per example. The result therefore concerns sentences that survived this selection. [A Fine-grained Sentiment Dataset for Norwegian](https://md.research.elamur.ai/free/en/papers/ovrelid-2020-fine-grained-sentiment-dataset-norwegian/)

The parliamentary task also calls for one decision per text. The authors assembled a balanced corpus of 6,000 transcribed speeches from 1998 through 2016. The two parties are Fremskrittspartiet and Sosialistisk Venstreparti. The party affiliation assigned to a segment is the speaker’s affiliation at the time of the speech. The system predicts that affiliation from the segment. This tests whether the pretraining supports a supervised distinction in political language within the assembled dataset. The paper uses publicly available parliamentary source material for this task. [The Talk of Norway](https://md.research.elamur.ai/free/en/papers/lapponi-2018-talk-norway-richly-annotated-corpus/)

Sequence classification on the NoReC and parliamentary test sets NB-BERT leads on both tasks, with the clearest separation in sentiment.

**The numbers**

| System or setting | macro F1 |
| --- | --- |
| NoReC sentiment mBERT | 69.7 |
| NoReC sentiment NorBERT | 81.7 |
| NoReC sentiment NB-BERT (this paper) | 86.4 |
| Parliamentary affiliation mBERT | 78.4 |
| Parliamentary affiliation NorBERT | 78.2 |
| Parliamentary affiliation NB-BERT | 81.8 |

The NoReC test reports a pooled result for Bokmål and Nynorsk. NB-BERT reaches 86.4 macro F1, followed by NorBERT at 81.7 and mBERT at 69.7. Both Norwegian-focused systems do well relative to the multilingual baseline in this comparison. Since the paper reports a combined score, the result shows the benefit for the pooled task and leaves the individual written varieties’ sentiment scores unspecified.

The parliamentary test is listed under Bokmål. NB-BERT reaches 81.8 macro F1, while mBERT scores 78.4 and NorBERT scores 78.2. The baselines are close, and their order differs from the sentiment result. In a balanced task, class balance controls the overall prevalence of the party labels in the constructed corpus. The cues available inside each speech can still vary, and the score summarizes success at classifying the held-out segments without identifying which cues drove particular decisions.

The difference between these sequence tasks helps explain the scope of the evaluation. The sentiment labels come from judgments about evaluative language in selected review sentences. The parliamentary labels come from an attribute of the speaker attached to the speech segment. Both ask for an overall decision, but the evidence relevant to each decision is different. Improvement on both is evidence that the continuation of pretraining helped on multiple sequence tasks under the study’s fine-tuning procedure.

#### Checking what remained multilingual

The authors also asked how much of mBERT’s multilingual performance would survive Norwegian-focused training. To keep the task comparable in broad terms, they used named-entity recognition throughout the multilingual check. English used CoNLL-2003, Swedish used Webbnyheter 2012 and Danish used DaNE. Spanish used CoNLL-2002, and Finnish used FiNER. The authors excluded datasets produced through automated or partly automated annotation. That choice makes each comparison depend on an existing human annotation standard, though the standards and sets of entity categories differ. [CoNLL-2003](https://md.research.elamur.ai/free/en/papers/sang-2003-introduction-conll-2003-shared-task/) · [CoNLL-2002](https://md.research.elamur.ai/free/en/papers/sang-2002-introduction-conll-2002-shared-task/) · [FiNER](https://md.research.elamur.ai/free/en/papers/ruokolainen-2019-finnish-news-corpus-named-entity/)

Named entity recognition on Swedish and Danish test sets NB-BERT places first on both Scandinavian benchmarks in the comparison.

**The numbers**

| System or setting | micro F1 |
| --- | --- |
| Swedish Webbnyheter English BERT | 82.5 |
| Swedish Webbnyheter mBERT | 85.3 |
| Swedish Webbnyheter NorBERT | 83.4 |
| Swedish Webbnyheter NB-BERT (this paper) | 85.9 |
| Danish DaNE English BERT | 73.9 |
| Danish DaNE mBERT | 83.4 |
| Danish DaNE NorBERT | 80.7 |
| Danish DaNE NB-BERT | 85.1 |

On Swedish, the best baseline is mBERT at 85.3 micro F1 and NB-BERT reaches 85.9. On Danish, NB-BERT scores 85.1, with mBERT at 83.4. The gains are measured within the respective test sets. The Swedish and Danish scores cannot establish which language the system handles better in general, since its predictions are judged against different texts and entity schemes. The authors place both results in the context of related languages that also had some presence in the continued-training corpus.

On English CoNLL-2003, NB-BERT and English-only BERT both score 91.3 micro F1 in the results table. mBERT scores 90.8 and NorBERT scores 87.8. The reported precision of the table therefore supports a tie between NB-BERT and English-only BERT on this benchmark. The English result is of interest because the authors estimate close to 4% English in the corpus. It gives a concrete instance in which English performance on a supervised task improved relative to the multilingual starting point even though most of the added material was Norwegian.

The two languages with no documented presence in the corpus show a different pattern. On Spanish CoNLL-2002, mBERT leads with 87.6 micro F1. NB-BERT scores 85.8, English-only BERT scores 81.8 and NorBERT scores 79.3. On Finnish FiNER, mBERT again leads at 88.7. NB-BERT scores 85.8, English-only BERT scores 82.9 and NorBERT scores 81.5. The comparison with mBERT shows a decline in these settings after continued training. The comparison with the other baselines shows that the adapted multilingual starting point still supported substantial performance on both tests.

The English-only baseline also provides another comparison on the Norwegian named-entity data. It reaches 75.1 micro F1 in Bokmål and 77.8 in Nynorsk, below each of the systems developed with direct exposure to Norwegian. These values come from fine-tuning on the Norwegian tasks. The table does not describe a system deployed in a new language without labeled examples. Its multilingual conclusions concern how well the pretrained weights support each language after adaptation to that benchmark.

### What the ablations show

#### The comparisons the authors can make

The paper offers an optimizer comparison and a comparison of pretraining schedules. It does not report a controlled removal of corpus sources or of OCR noise. The distinction matters because an ablation asks what happens when a component changes while relevant alternatives are held fixed. The optimizer experiment changes a specific part of the training procedure. The schedule experiment changes a bundle of choices near the end of training. The comparisons among independently trained BERT systems involve wider differences.

The Adam and LAMB experiment matches the batch size at 2,048 sequences and the learning rate at 4e-4 over the 100,000-step trial. The authors’ interpretation is that their result agrees with earlier findings about the stability of large-batch training with LAMB. This supports using LAMB in the chosen setting. The evidence concerns how optimization behaves on the masked-token task under those settings. The paper gives no matched downstream test in which Adam and LAMB are the only difference, so the trial leaves the optimizer’s contribution to the classification scores unmeasured.

The earlier large-batch work considered the interaction between batch size and learning rate, and the Norwegian authors used that insight in designing their runs. Raising the learning rate while retaining stable behavior was part of the goal. The comparison consequently addresses a specific operational question. The authors needed a workable way to process a large collection within the training setup they had. Stability at their chosen batch size and learning rate gave them grounds to proceed with the schedule. A study of optimal settings across corpora and accelerators would require a broader comparison.

#### What longer sequences appear to contribute

Versions A and B started from the same weights and followed the same initial training. This controls for several plausible sources of variation at the beginning of the runs. The authors also chose the schedules to keep overall training time roughly comparable. Version B spent more time on the 512-token examples and ended with them. Version A used an additional long-sequence phase, followed by a return to 128-token examples.

The authors say version B performed slightly better on all four downstream task types and give it the name NB-BERT in the reported results. They omit the version A scores. As a consequence, the paper establishes the direction of the comparison as reported by the authors and the fact that they selected the longer-context schedule. It leaves the size of the change in each task and the consistency of that change across repeated runs unspecified.

The comparison supports the longer-context schedule as a package. Version B’s additional emphasis on 512-token inputs is accompanied by a different final decay schedule and the absence of a final short-sequence phase. The batch size also changes with sequence length, so a schedule’s duration and its number of examples need separate consideration. The evidence does not isolate the effect of seeing longer linguistic contexts from the effect of how frequently the weights were updated on different kinds of examples or the choice to finish with long sequences.

A plausible reason to test longer inputs is that recovering a masked token can sometimes benefit from context outside a local phrase. A longer input leaves room for that context. The study does not trace the improvements in classification to examples that require long-range evidence. It evaluates the trained systems as a whole. For a reader assessing the mechanism, the direct result is that the version B schedule was preferred on the reported downstream tasks. The proposed role of wider context remains an explanation to investigate.

#### Reading the multilingual pattern as an analysis

The cross-language results provide a comparison organized around exposure. Bokmål and Nynorsk dominate the continued-training corpus. English has a small documented share. Swedish and Danish are present in the remaining mixture and have a close relationship with Norwegian in the authors’ account. The paper has no documented Spanish or Finnish material in the corpus. NB-BERT improves on mBERT in the first groups and trails it on the Spanish and Finnish benchmarks.

That ordering is compatible with the hypothesis that exposure during continued pretraining helps preserve or improve downstream performance. It also shows that a multilingual initialization can remain useful after a large change in the distribution of the training text. NB-BERT’s results for Spanish and Finnish, though below mBERT’s, still exceed the other reported baselines. The inherited representations continued to support adaptation to those tasks.

The comparison does not vary the presence of an individual language while holding everything else fixed. Swedish and Danish differ from Spanish and Finnish in both their documented exposure and their relationship to Norwegian, and each language has its own benchmark. English supplies a case with more clearly estimated exposure, but the authors also point to training choices such as LAMB and larger batches as possible contributors. The results identify a pattern across evaluations. They leave open the individual effects of direct exposure, transfer from similar languages and changes in optimization.

The main Norwegian comparison has the same interpretive boundary. NB-BERT and mBERT share a starting point, so their score differences show what happened after the entire continuation procedure. NB-BERT and NorBERT address the same linguistic target, but their corpora and training approaches differ. Taken together, these comparisons make the final system’s performance clear. They do not allocate that performance among corpus scale, genre, initialization or the schedule.

### Limitations

#### Limits the authors state

The authors explicitly leave the effect of OCR errors unresolved. They found that a corpus containing some errors could support good performance. They also explain that removing all artifacts would have required substantial manual work or a large reduction in available text. Their decision to retain some noisy material allowed them to use more of the collection. The downstream results show that the retained noise was compatible with useful training under the project’s filters.

The paper speculates that the system might learn to distinguish recognition errors from ordinary patterns in writing. It also raises the possibility that the benefit of more text outweighs the cost of some noise. Those are hypotheses. There is no comparison that varies recognition error while matching the text and overall amount of data. The paper calls for systematic investigation of the effects of recognition noise and artifacts. The demonstrated outcome applies to a particular combination of corpus size, content and filtering.

The authors also note that the evaluated datasets lack a benchmark against human performance. This matters especially on tasks where the baseline and NB-BERT both achieve high F1. An annotation may involve choices that reasonable readers would make differently. A high score measures agreement with the dataset labels. Without a human comparison under the same conditions, the result cannot locate a practical ceiling or show how closely the system approaches it.

The inherited vocabulary is another limit the authors identify. Only a small fraction of its 119,547 tokens pertain to Norwegian in their account. Keeping it made it possible to benefit from the existing multilingual weights in the chosen setup. The paper proposes testing a vocabulary tailored to Norwegian to see whether that would improve performance. It does not measure the segmentation gain from such a vocabulary or how a vocabulary change would affect the cross-language results.

Finally, the authors selected BERT for ease of training and benchmarking and acknowledge other architectures and pretraining objectives as possible uses of the corpus. They also identify room to increase corpus coverage within the institution’s holdings. Neither possibility was tested in this study. The release covers the trained BERT system and the supporting code and tools. Access restrictions motivated the corpus-building work, and the paper does not announce public distribution of the complete underlying collection.

#### Limits implied by the design

The corpus totals need care in interpretation. The inventory gives 109.1GB after deduplication and the introduction describes the collection as 109GB. Elsewhere the discussion uses wording that describes a 109GB corpus as Norwegian-only, while the language estimate explicitly includes English and other languages. The detailed inventory and composition estimate support reading the reported total as the size of the predominantly Norwegian collection used in the study. They provide no separate measurement of a purely Norwegian subset of that size.

The composition is an estimate based on metadata and selected word frequencies. It is useful for describing the collection at a broad level. It does not identify the language of every paragraph, the mixture in every training batch or how much text a model actually sees from each period and genre. Deduplication and example construction can affect which passages are represented and how often. The paper gives an inventory and a training schedule, leaving a source-by-source account of exposure unanswered.

The filtering procedure changes the types of text available to the system. Excluding poorly recognized scans removes degraded transcription, and it also removes anything unique to those scans. Text-length requirements favor publications or sections with sustained running text. Paragraph deduplication removes exact repetition as defined by the preparation process. The retained corpus consequently reflects what was accessible, recognized with adequate confidence and usable under the authors’ criteria. Its publication span and genre range establish breadth in the training material. The evaluations do not test performance separately on historical writing, publication genres or OCR quality levels.

Comparison under shared fine-tuning settings has a clear advantage. Every system is evaluated within the same general procedure, and the learning-rate and epoch choices do not come from separate optimization efforts of different sizes. Those settings were selected for mBERT, however. NB-BERT and NorBERT might each respond differently to another learning rate, training duration or warmup schedule. The scores answer how they compare under the common settings. They do not establish what each system would achieve after an equally extensive independent search.

The tables give headline test scores without intervals or a reported distribution across training runs. The reader can identify the rankings and inspect the size of the reported gaps. In close cases, such as the English tie at the published precision or the Swedish gain over mBERT, the tables alone cannot establish how stable the ordering would be under different fine-tuning runs. The absence of version A scores further limits the interpretation of the schedule comparison. Its result is available as the authors’ qualitative account of a slight advantage.

The sentiment task excludes sentences with conflicting judgments or no sentiment. Its measured gain therefore applies to an adaptation of the original annotations with a restricted set of examples. The aggregated Bokmål and Nynorsk score also leaves the contribution of each variety open. The parliamentary test measures prediction of the two party labels for segments drawn from the period and speakers in the dataset. The paper does not report controls separating stylistic language from party-associated topics, recurring speakers or changes over time. Balanced representation of the party labels does not settle which signals the classifier used.

Pretraining included parliamentary documents, and the political classification task also draws on parliamentary material. This makes the nature of the division between pretraining and the labeled benchmark relevant. The paper does not report a check for overlapping passages across those collections. The shared domain on its own establishes neither overlap nor its absence. The reported test reflects the comparison as run, and the extent to which it demonstrates transfer to entirely unseen parliamentary documents remains unspecified.

Finally, the multilingual experiments cover one supervised task per non-Norwegian language. They provide evidence about adapting the weights to named entities in those datasets. Transfer to other behaviors, such as grammatical tagging or sentence classification in the same languages, would require tests of those behaviors. The authors’ suggestion that adding small amounts of Spanish and Finnish might have prevented the decline follows from the observed pattern. It remains a proposal because the study reports no run with those additions.

### What came after

#### From comparing systems to broadening evaluation

One direct connection comes from the contemporaneous Norwegian BERT project. Kummervold and colleagues say that the authors of [Large-Scale Contextualised Language Modelling for Norwegian](https://md.research.elamur.ai/free/en/papers/kutuzov-2021-large-scale-contextualised-language-modelling/) evaluated both NorBERT and NB-BERT and obtained results consistent with their own. The two projects therefore supplied comparisons in both directions. The national collection project tested the Oslo system in its evaluation, and the Oslo work tested the national collection system alongside its own. This is the clearest documented case of a citing work using NB-BERT in an evaluation.

[ScandEval](https://md.research.elamur.ai/free/en/papers/nielsen-2023-scandeval-benchmark-scandinavian-natural-language/) broadens the evaluation question to Scandinavian natural language processing. Kummervold and colleagues compared systems within selected benchmarks and warned that scoring schemes across languages made raw cross-language rankings hard to interpret. A benchmark organized at the Scandinavian level addresses the wider problem of establishing how language technology performs across the region. ScandEval’s citation connects that benchmark effort to earlier systems and evaluations developed around individual Nordic languages.

The citing work [NLEBench+NorGLM](https://md.research.elamur.ai/free/en/papers/liu-2024-nlebench-norglm-comprehensive-empirical-analysis/) brings the evaluation question to generative language models in Norwegian. It presents an empirical analysis and a benchmark dataset for that setting. NB-BERT’s tests concern an encoder adapted to predict labels for tokens or passages. Generative evaluation concerns a system that produces text, so it calls for evidence beyond those classifier scores. The connection lies in the shared effort to assess systems in Norwegian under a task design suited to their intended behavior.

#### More tasks for Norwegian language technology

[NoCoLA](https://md.research.elamur.ai/free/en/papers/jentoft-2023-nocola-norwegian-corpus-linguistic-acceptability/) provides a Norwegian corpus for linguistic acceptability, the question of whether a linguistic expression is judged acceptable. The original archive study asked its systems to label observed words, identify entities or choose a label for a whole passage. Acceptability judgments add a different kind of sentence-level assessment. A corpus built for that purpose extends the range of properties researchers can evaluate when asking what Norwegian pretraining supports.

The citing [QFrCoLA](https://md.research.elamur.ai/free/en/papers/beauchemin-2025-qfrcola-quebec-french-corpus-linguistic/) study provides a corpus of acceptability judgments for Quebec French. It extends the set of language varieties for which a judgment resource is available. The link to the Norwegian work is at the level of language-specific resources and assessment. The archival BERT project showed how much the available text matters to a Norwegian system. An acceptability corpus addresses a separate resource need, supplying judgments for a particular variety so that a corresponding capability can be evaluated.

[NARC](https://md.research.elamur.ai/free/en/papers/maehlum-2022-narc-norwegian-anaphora-resolution-corpus/) supplies a Norwegian corpus for anaphora resolution. In that task, a reader or system connects an expression that refers back to something with the relevant earlier expression. Finding a name, as in the NB-BERT evaluation, identifies and labels a mention. Resolving a reference asks how mentions relate in context. The citing corpus therefore points to an additional way to evaluate the contextual representations that Norwegian pretraining aims to provide. [Coreference resolution](https://md.research.elamur.ai/free/en/topics/coreference-resolution/)

[Automatic Lemmatisation for Norwegian](https://md.research.elamur.ai/free/en/papers/yildirim-2026-automatic-lemmatisation-norwegian/) addresses the task of mapping word forms to their dictionary forms, called lemmas. This is related to grammatical tagging because both tasks analyze words in context and deal with variation in form. They ask for different outputs. A part-of-speech label gives the grammatical category, while a lemma identifies the underlying dictionary entry used to group forms. The citing study extends the set of Norwegian word-level tasks considered after the NB-BERT evaluation. [Lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/)

[BRAGD](https://md.research.elamur.ai/free/en/papers/simonsen-2026-bragd-constrained-multi-label-pos/) studies constrained multi-label part-of-speech tagging for Faroese. This returns to a task family already used in the Norwegian paper, while taking up another language and a tagging setup that accommodates multiple labels under constraints. The connection is through the use of grammatical categories to evaluate or develop technology for a particular language. The Faroese work addresses its own labeling problem, so the Bokmål and Nynorsk tagging scores supply context for that line of research instead of an estimate of Faroese performance.

#### Making text quality and behavior explicit targets

[Noise, Novels, Numbers](https://md.research.elamur.ai/free/en/papers/laith-2024-noise-novels-numbers-framework-detecting/) provides a framework for detecting and categorizing noise in Danish and Norwegian literature. This takes up a property of text that the NB-BERT study had to manage while building its corpus. The earlier project used recognition confidence and document heuristics to decide which text to retain. Treating noise as something to detect and categorize gives researchers a way to characterize the material itself. That distinction matters for the original open question about OCR. Measuring the errors in a collection is a step towards testing what happens when the amount or type of noise changes.

The cited work on [LGBTQIA+ bias in large Norwegian language models](https://md.research.elamur.ai/free/en/papers/bergstrand-2024-detecting-mitigating-lgbtqia-bias-large/) studies detecting and mitigating a particular form of bias. That subject extends Norwegian evaluation beyond the correctness of grammatical tags and classification labels. A score on names, sentiment or political affiliation gives evidence about the corresponding prediction task. Behavior related to bias calls for evaluation designed around the behavior of interest. The cited work takes up both the measurement and mitigation parts of that question for Norwegian systems. [Bias, fairness and safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/)

[TryggLLM](https://md.research.elamur.ai/free/en/papers/touileb-2026-tryggllm-benchmark-evaluating-llm-safety/) takes a benchmarking approach to safety in Norwegian. It continues the move towards evaluating behaviors that the classification experiments in the original paper did not cover. The Norwegian language focus remains central, while the outcome being assessed changes. A safety benchmark provides a way to ask about that outcome directly, just as the original study used separate datasets to assess names, grammatical categories, sentiment and party affiliation.

These later connections vary in what the citation establishes. The reciprocal comparison with NorBERT documents evaluation of NB-BERT itself. For the other works, the citation connects the paper to a stated task, resource or research question. Their titles establish those subjects, while their use of the original weights, archive corpus and training procedure remains unspecified. Taken at that level, the sequence shows how Norwegian and related-language research widened from obtaining a strong training resource and testing a few downstream tasks to measuring more kinds of linguistic competence, text quality and system behavior.

## Cite

Cite as Per E Kummervold, Javier De la Rosa, Freddy Wetjen and Svein Arne Brygfjeld. 2021. Operationalizing a National Digital Library: The Case for a Norwegian Transformer Model. Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{kummervold2021operationalizing,
  title = {{Operationalizing a National Digital Library: The Case for a Norwegian Transformer Model}},
  author = {Per E Kummervold, Javier {De la Rosa}, Freddy Wetjen and Svein Arne Brygfjeld},
  booktitle = {Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa)},
  year = {2021},
  url = {https://aclanthology.org/2021.nodalida-main.3/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
