---
title: "Development and Evaluation of Pre-trained Language Models for"
description: "An evaluation of pretraining on historical Danish and Norwegian novels for classifying sentiment and distinguishing meanings of fate."
canonical: "https://research.elamur.ai/free/en/papers/laith-2024-development-evaluation-pre-trained-language/"
---
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/laith-2024-development-evaluation-pre-trained-language/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / Development and Evaluation of Pre-trained Language Models for Historical Danish and Norwegian Literary Texts

# Development and Evaluation of Pre-trained Language Models for Historical Danish and Norwegian Literary Texts

Paper · 2024 · Ali Al-Laith, Alexander Conroy, Jens Bjerring-Hansen et al.

**Authors:** [Ali Al-Laith](https://md.research.elamur.ai/free/en/authors/ali-al-laith/), Alexander Conroy, Jens Bjerring-Hansen and [Daniel Hershcovich](https://md.research.elamur.ai/free/en/authors/daniel-hershcovich/) · **Year:** 2024 · **Venue:** Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024) · **Licence:** [CC BY-NC 4.0 (ELRA, LREC proceedings)](https://creativecommons.org/licenses/by-nc/4.0/)

[**0** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4412220855) · [Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)](https://aclanthology.org/volumes/2024.lrec-main/) · [licence](https://creativecommons.org/licenses/by-nc/4.0/)

- [Publisher's page](https://aclanthology.org/2024.lrec-main.431/)
- [PDF](https://aclanthology.org/2024.lrec-main.431.pdf)
- [DOI 10.63317/2ixrvppuoo96](https://doi.org/10.63317/2ixrvppuoo96)
- [OpenAlex](https://openalex.org/W4412220855)

Citations: OpenAlex, 2026-10-14.

## Summary

In a historical novel, a reference to fate can invoke divine providence, point to the material circumstances that shape a life, or simply carry the story forward. The same word can do all of these things. A system trained chiefly on contemporary writing has to interpret such passages in a context where spellings, expressions, and assumptions about the world can differ from those it encountered during training. The authors investigate whether learning from historical novels helps a system classify passages from those novels, using two tasks that require different kinds of interpretation.

The study uses MeMo, a collection of Danish and Norwegian novels from the closing decades of the nineteenth century. The authors train two systems from scratch on MeMo and develop a third, MeMo-BERT-3, by giving the existing Danish system DanskBERT additional training on the novels. In this preliminary stage, the systems learn by recovering tokens hidden in passages. They then receive labeled examples for each task. One dataset asks whether a sentence expresses negative, neutral, or positive sentiment. The other, introduced in the paper, asks how a passage uses *skæbne*, the Danish word for fate, or a related form. The labels distinguish religious or metaphysical uses, secular or material uses, conventional expressions, and cases that remain ambiguous in context. The tasks are examples of [sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/) and [word sense disambiguation](https://md.research.elamur.ai/free/en/concepts/word-sense-disambiguation/).

MeMo-BERT-3 achieved the highest average F1 score on the validation and test sets for both tasks. On the sentiment test set, it scored 0.77, while the DanskBERT system from which it started scored 0.76. On the test set for *skæbne*, the corresponding scores were 0.61 and 0.46. The two systems trained from scratch fell below DanskBERT on both test sets. The comparison therefore gives a more specific result than a ranking of historical and contemporary training data. Additional training on MeMo helped most in the setup that retained the knowledge already learned by DanskBERT, and the clearest test-set gain was on the fate task.

The evaluations concern annotated passages from the same collection used for historical pretraining. They show how the systems compare on those tasks within MeMo. Their performance on independent collections, other periods, and other genres remains open, as does the question of whether the fate classifier is reliable enough to support estimates of how the concept changed across the whole collection. The authors release the trained systems and make the new fate dataset available for further study.

## Deep dive: Development and Evaluation of Pre-trained Language Models for Historical Danish and Norwegian Literary Texts

An evaluation of pretraining on historical Danish and Norwegian novels for classifying sentiment and distinguishing meanings of fate. · about 30 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

#### What changes when the text is historical

The project begins with a problem familiar to anyone reading a novel from an earlier period. Recognizing the words in a passage can leave its meaning unsettled. Historical writing can preserve spellings and expressions that are unfamiliar today. It can also put familiar words to uses that depend on social or religious assumptions a contemporary reader might miss. The authors take this second issue seriously. Their example is *skæbne*, a word that can refer to a divinely or metaphysically ordered fate, or to an outcome shaped by material circumstances and human conduct. The distinction matters to a literary scholar because the way a story assigns responsibility can change how a character's situation is understood. This is a question of [historical linguistics and language change](https://md.research.elamur.ai/free/en/topics/language-change/).

A collection of novels makes the problem broader than recognizing an obsolete vocabulary. Dialogue and narration can present different views of the same event, and a conventional phrase can carry very little evidence about what a character believes. An expression involving fate may be significant because it explains an outcome, or it may be an ordinary way of referring to what happens to somebody. A system asked to classify the difference has to use the words around the occurrence and, in some cases, the details of a scene. Familiarity with modern uses of the word provides only part of what the task demands.

The historical collection also matters to the kinds of questions the authors want to ask. MeMo, short for Measuring Modernity, was assembled to study changes in Scandinavian literature and society during the period associated with the modern breakthrough. The collection brings together novels and metadata that can support inquiries across a substantial body of writing. The project asks how new ways of thinking and writing appeared, who participated in those changes, and how widely the changes reached. A classifier could help a researcher examine material across many books. Before its outputs can support a literary argument, the researcher needs evidence that it handles the distinctions on which the argument depends.

The paper addresses this issue through [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/). Its systems first learn from text and then learn to assign labels for particular tasks. In this setting, a [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) acquires information about which tokens fit a passage by practicing on large amounts of text. That preparation gives the later classifier a way to represent passages before it sees examples labeled by a researcher. The historical question is whether preparation on the novels makes those representations more useful for analyzing the novels themselves.

#### What previous studies had tried

The authors describe two established ways to prepare a system for historical writing. One starts with a system that has already learned from other text and gives it more practice on historical material. The other starts with randomly initialized parameters and learns from historical material from the outset. Parameters are the values adjusted during training to change how the system represents and predicts text. Starting with existing values brings earlier training into the historical stage. Starting with random values makes the historical corpus responsible for building that initial competence.

The related work describes historical English as the area where these approaches had received the most attention. The paper mentions an adaptation of BERT for historical material alongside MacBERTh and ECCO-BERT. It also discusses BERToldo for historical Italian as an example that combines the two training strategies and performed well on texts by Dante Alighieri. These precedents give the authors reasons to investigate both strategies on a new collection. Their own work also draws on the encoder design introduced in [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/).

The earlier work also shows how differently a historical system can be evaluated. In the authors' account, D’AlemBERT was trained on Early Modern French material extending from the sixteenth to the eighteenth century and improved the assignment of grammatical word categories. That task is [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/). The paper also mentions work with Plutarch's writing, where further training of BERT on that corpus showed promise for classifying texts and their sentiment. These examples address different periods, languages, and kinds of prediction. They establish the precedent for historical adaptation while leaving the Danish and Norwegian literary case open.

#### The existing Danish and Scandinavian systems

The resource gap was specific. Several systems could already process Danish, and the training material for some included works from earlier periods. The authors identify a gap in systems deliberately trained for historical Danish and Norwegian. An existing general-purpose system could therefore be both an experimental baseline and a starting point for adaptation. The sources used in earlier training help explain why these are meaningful alternatives.

DanBERT used the BERT-Base design and was trained on more than 40 million Danish words, whose source the authors describe as unknown. Danish BERT BotXO had a more clearly described contemporary training mix. Its 1.6 billion Danish words came from Common Crawl, the Danish edition of Wikipedia, debate forums, and OpenSubtitles. Such collections give a system practice with different kinds of modern language. A historical literary collection gives it sustained exposure to text with a different publication setting, period, and use of narrative.

DanskBERT is especially important because its training already included a mix of periods. It was trained on the Danish Gigaword Corpus, which the paper describes as primarily contemporary and rich in legal and social-media text. That corpus also contains 25.6 million words of Danish literature spanning 1700 to the present as described by the authors. Consequently, the comparison with DanskBERT asks what a period- and genre-focused stage adds to a system that has already encountered some Danish literature, including historical writing. It differs from a comparison in which the starting system has had no exposure to such material.

ScandiBERT offers another relevant background. It learned from data pooled across Scandinavian languages, with Danish and Norwegian among them. Its sources included Danish Gigaword and the Norwegian Colossal Corpus. The paper describes the latter as containing more than 7 billion Norwegian words from several sources and periods, including books. This makes ScandiBERT a useful example of how breadth can enter through languages as well as through sources. It also means that the label “contemporary baseline” is an approximation for a group whose members have different training histories.

For the literary collection itself, the authors treat the Danish and Norwegian writing together. They explain that the written forms were practically identical until 1907. The appendix describes a broadly shared written language alongside distinctive Norwegian words and passages with dialect forms. Pooling the texts makes sense for the stated aim of learning from the collection as a whole. It also fixes the level of the main evaluation. The question is how well a system handles the combined literary material, with results reported for that material as a group.

### The method, step by step

From historical novels to sentence and passage classification The steps in order.

#### Establishing the training collection

The paper's main corpus description places MeMo in 1870–1900 and gives 839 novels as the basis of the study. Its corpus statistics report 3,229,137 sentences and 52,724,457 words, with a total size of 690 MB. The authors also report an average of 3,849 sentences and 62,842 words per novel, and 16 words per sentence. The appendix speaks about the collection in terms of printed volumes and gives a separate inventory. It describes 858 volumes published in 1870-99, totaling 4.5 million sentences and 65 million words. The paper does not reconcile the inventories. The figures for training as described in the main study are the ones reported for the 839 novels.

According to the data statement, the collection contains original novels written by Danish and Norwegian authors and published in Denmark. Bibliographic sources guided the choice of titles. Translations, reprints, and serialized novels fell outside the selection, as did the diasporic literature described in the appendix. The resulting collection still covers considerable variety within book-length fiction. The authors describe historical novels alongside fiction about contemporary life, as well as romance, crime, and war stories. In style, the corpus includes experimental forms of realism and prose that favors more general or abstract description. A shared historical setting can therefore coexist with quite different language from book to book.

The metadata attach characteristics of the books and their authors to the texts. These include publication year, author nationality and gender, and the typeface used in the printed volume. Publication year later enters the split for the fate dataset. Typeface is relevant at an earlier stage, when the printed texts become machine-readable. The appendix reports that approximately 16% of the books have Norwegian authors and around 20% of the novels are by women. These figures describe the collection and its curation. The experiments report overall task scores rather than scores for those groups.

There is variation at the level of spelling as well. The appendix illustrates changes associated with the Spelling Reform of 1892 with forms such as *Kjøbenhavn* and *København*. Variation can also reflect a particular writer or the use of dialect in a book or a dialogue passage. This matters to the training design because the text fed into the system is the basis on which it learns recurring forms. It also matters to the fate dataset. A search that recognizes only one spelling or only the isolated headword would define a narrower set of examples than the one the authors intended to study.

#### Producing usable text from printed books

The historical material entered the collection through optical character recognition, or OCR. This process converts the appearance of printed characters into digital text. The Royal Danish Library's digitization team produced searchable text layers in PDF files and supplied text at both the volume and page level. Collection preparation therefore involved dealing with errors introduced by digitization as well as with features present in the original books.

The correction procedure depended on the typeface. For Antikva, the Roman type used in some volumes, the project combined hand-designed substitutions with lookup in the Danish resource Sprogteknologisk Ordbase. For Fraktur, the Gothic type used in others, it combined spelling correction, substitution rules, and another pass of character recognition. The Fraktur output was supplemented with an alternative Danish recognition layer to help with characters including *æ* and *ø*. In the earlier correction work described by the appendix, the Fraktur word error rate went from 10.46% to 2.84%. These are error rates for the text-recognition procedure. The F1 scores in the experiments concern a different stage, after the text has become an input to a classifier.

The project also produced a modernized spelling layer. Its changes included lowercasing nouns, replacing *aa* with *å* in the normalization process, and adjusting recurring character patterns. That layer and the corrected volume texts were available separately, along with an indexed corpus format. A spelling correction seeks to restore the form on the printed page when recognition has gone wrong. Orthographic normalization gives the text a modern counterpart even where the original form was read correctly. The distinction matters when an analysis depends on the occurrence of a particular historical spelling.

The corrected data also received [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/). The corpus pipeline added grammatical categories and lemmas, along with sentence and paragraph boundaries and counters that locate words and lines in their volumes. A [lemma](https://md.research.elamur.ai/free/en/concepts/lemma/) is a conventional form used to group related inflected forms of a word. The archived vertical format gives each token its own line and stores its annotations alongside it. These layers describe the resources available in MeMo. The historical training objective itself uses sequences of input tokens and asks which tokens belong in selected positions. The fate dataset has its own stated sentence-segmentation procedure.

#### Choosing what the systems bring to training

The three historical systems all use an encoder-only [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). An encoder turns an input passage into contextual representations, so the representation of a token can depend on the words around it. Attention is the part of the design that lets information from different input positions contribute to those representations. Layers repeatedly transform them, and separate attention heads within a layer give the encoder several ways to combine information across positions. The study uses the encoders to recover hidden tokens during pretraining and to classify whole sentences or passages during task training. The architecture comes from [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/).

The first two runs start with random parameter values. MeMo-BERT-1 is built on BERT and has 12 attention heads, 12 layers, a 30,000-entry vocabulary, and a hidden size of 768. The hidden dimension describes the size of the internal representation at an input position. The vocabulary controls which token identities the system can take as input or predict. A larger hidden dimension and a larger vocabulary describe different aspects of a system, even when they grow together in a particular comparison.

MeMo-BERT-2 also starts with random parameters. Its XLM-RoBERTa architecture has a hidden size of 1024, 24 layers, a 50,000-subword vocabulary, and 16 attention heads. [Subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) lets a form be represented as pieces from a fixed vocabulary. The distinction between a word in the corpus statistics and a token in training is important here. A word counted once in a corpus total can occupy several token positions when its spelling is divided into pieces. The architecture for this configuration comes from [Unsupervised Cross-lingual Representation Learning at Scale](https://md.research.elamur.ai/free/en/papers/conneau-2020-unsupervised-cross-lingual-representation-learning/).

MeMo-BERT-3 starts from DanskBERT's trained parameters. DanskBERT had itself been developed by continuing training from XLM-RoBERTa on Danish Gigaword. The stated MeMo-BERT-3 configuration pairs a 250,000-subword vocabulary with 16 attention heads, 24 layers, and a hidden size of 1024. Its route into the experiment is thus a sequence of training stages. There is the earlier XLM-RoBERTa system, the stage on Danish Gigaword that produced DanskBERT, and the additional stage on MeMo. The run on the novels begins with what the preceding stages have already learned.

All three encoders distinguish upper- and lower-case input. This matters in a corpus whose versions include historical casing and a normalization process that changes the casing of nouns. It also illustrates why a corpus name alone does not completely specify the inputs used by a classifier. The available text layer, the way the input is segmented, and the limits of the system's vocabulary all affect how the same printed passage is presented for training.

#### Learning from MeMo before seeing task labels

The three training runs share a masked-token objective. The authors describe masking 15% of the input tokens and training the encoder to predict the originals. For a reader new to the method, the task resembles reading a passage with some pieces covered. An encoder has to use the visible context to assign probability to the missing identities. The original passage supplies the target at each selected position. The procedure therefore derives training examples directly from the text and can run across the corpus without requiring anyone to label its sentences for sentiment or its passages for a sense of fate.

The masking rate concerns input tokens during pretraining. The authors divide the corpus separately, with 80% for training and 20% for validation, using a random split. Training batches have size 16 and validation batches size 32. They accumulate gradients over 8 steps, so the information used to adjust the parameters is collected across successive steps before an update. The specified learning rate is 1e-4, a setting that controls the scale of parameter changes. The schedule calls for 3 epochs, a maximum of 12,500 training steps, and 1250 warm-up steps. In this account an epoch is a pass through the training data, while warm-up is the opening part of the update schedule.

The choice among saved versions, or checkpoints, is made using validation loss. Loss measures how poorly the predictions fit the training objective on the examples used to calculate it. Looking at loss on the validation portion gives the authors a basis for choosing a checkpoint using text outside the portion used to adjust the parameters during this stage. This choice precedes the tasks of predicting sentiment and distinguishing uses of *skæbne*. Their results are measured later with separate labels and scoring.

Training was distributed across two A100 GPUs. The authors report 44 hours for MeMo-BERT-1, 36 hours for MeMo-BERT-2, and 32 hours for MeMo-BERT-3. The times document the runs under the chosen settings and hardware. The paper describes the objective and its masking rate in prose, without giving a mathematical expression for the loss. The authors make the resulting systems and datasets available through Hugging Face.

#### Preparing the sentiment examples

The sentiment benchmark comes from earlier work on MeMo. Its unit is a sentence, and the prediction is a label for that sentence's sentiment. The dataset contains 2,748 manually labeled sentences. Negative sentences account for 41.4%, neutral ones for 28.7%, and positive ones for 29.9%. These are proportions of the dataset as a whole. The authors use the original partitions for training, development, and testing, so the examples and label scheme come from an existing evaluation of [Sentiment Classification of Historical Danish and Norwegian Literary Texts](https://md.research.elamur.ai/free/en/papers/laith-2023-sentiment-classification-historical-danish-norwegian/).

The sentence label captures a different property from the token identities used during pretraining. A system can be good at predicting a missing word and still need labeled examples to decide how the benchmark treats the sentiment of the complete sentence. In a novel, the tone of an utterance and a reader's judgment about the broader scene can be different matters. The prediction required here is defined by the available annotated sentence. The experiment gives the encoder labeled sentences so it can adjust to this task.

#### Finding and reading occurrences of fate

The fate dataset begins with a search through MeMo. A regular expression, a pattern used to match forms in text, was designed to collect variants of *skæbne*. The search included inflections, derivatives, and compounds. For instance, it also selected *vanskæbne*, meaning misfortune, and *skæbnesvanger*, meaning fateful. Broad matching gives the dataset a wider view of how fate-related language appears. It also makes the task a study of uses across a family of expressions, since some matches carry information from the rest of the compound or derived form.

The authors then used the Danish spaCy pipeline to identify sentence boundaries. Each extracted segment spans nine sentences, with the expression of interest in the central one. The surrounding sentences can identify what a character is responding to or indicate how a scene assigns responsibility for an outcome. The model ultimately classifies the segment as an example of the target expression in context. The search and segmentation produced 8031 segments, which were shuffled before annotation so the annotator could read across novels and across the period without following a chronological sequence. A Danish-speaking literary scholar on the author team annotated the first 650 segments after shuffling.

Two categories describe ideas of fate. The pre-modern category covers uses with a religious or metaphysical basis. One of the examples connects fate with God's love and places its explanation beyond ordinary reasoning. The modern category covers secular and material accounts. In the corresponding example, a character believes a man bears responsibility for a young woman's ruin. The interpretive distinction is about where the passage locates the forces that shape a life. The setting or publication date alone would leave that question open.

The other categories capture cases for which this division is insufficient. The figure-of-speech label includes idioms or conventional narrative expressions that convey little about a worldview. In the paper's example, a character reconsiders who had taken an interest in his fate. The ambiguous label applies where the surrounding text leaves several interpretations plausible. One example has a woman discovering that a decision has been made about her future, with the decision and its expected effects clear enough for the story but the basis for reading the reference to fate less definite. These are illustrations of the annotations, rather than rules for assigning a label whenever a particular word appears.

The categories have different roles in the benchmark. A pre-modern or modern label selects an interpretation of fate. The figurative category identifies a kind of conventional use, and the ambiguous category records limits on interpretation from the given passage. Thus the task asks for a broader judgment than a choice between religious and secular dictionary senses. The observed totals were 109 pre-modern examples, 87 modern examples, 275 figures of speech, and 179 ambiguous examples. The two classes that correspond most directly to the paper's literary question are smaller in the annotated collection than either of the other classes.

The main annotation was carried out by one scholar. To measure whether another reader would make the same decisions, the authors compared two literary scholars' labels on 100 segments. They agreed on 69 and disagreed on 31. Cohen's kappa was 0.56. Kappa puts observed agreement in relation to the agreement expected from the annotators' overall patterns of label use. It gives a complementary account to the raw count of matching judgments. The authors then partitioned the dataset using the year associated with each segment, with 70% for training, 15% for validation, and 15% for testing.

#### Training for the classifications

Once pretraining was complete, the authors used [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) to adapt each historical system and each baseline. This stage adjusts an existing encoder using examples with task labels, in place of predicting masked tokens. For sentiment, the goal is to select a class for a sentence. For fate, it is to select a category for the use of a target form in a longer passage. Each system was fine-tuned separately for each task for 20 epochs. The authors report averages from five repetitions of the runs, each using a different random seed. A seed sets the starting state for randomized operations, so repeating a task run lets the reported result reflect several such training trajectories.

### Experiments and results

#### What the evaluation compares

The experiments compare the three MeMo configurations with DanskBERT, Danish BERT BotXO, ScandiBERT, and DanBERT. The authors chose baselines with a record of use or performance in relevant language tasks. Their discussion points to prior benchmarking on Scandinavian datasets through [ScandEval](https://md.research.elamur.ai/free/en/papers/nielsen-2023-scandeval-benchmark-scandinavian-natural-language/). In this study, the baseline encoders receive task-specific fine-tuning on the same labeled material as the MeMo encoders. This makes the comparison one between systems after task training. For the main adaptation question, the most direct reference is DanskBERT, because it is also the source of the parameters in MeMo-BERT-3.

The evaluation involves a different partition for each task. The sentiment experiments keep the original allocation of 86% training, 10% development, and 4% testing within the 2,748 annotated sentences. The fate experiments use the year-based allocation of 70% training, 15% development, and 15% testing within the 650 annotated segments. Development is the intermediate evaluation portion, called validation in the results. These are partitions of labeled data. The earlier 80% and 20% division pertains to the separate masked-token stage and serves a different purpose.

The reported metric is F1. In a classification task, precision describes how many predictions for a class are correct among predictions of that class. Recall describes how many of the examples belonging to that class are correctly recovered. F1 combines these aspects of performance so that a high score calls for both. With several classes there are different ways to aggregate the underlying counts or class scores, and the paper does not specify which averaging convention it uses for F1. The averages across random seeds are explicitly reported. Those averages describe variation in training runs at the reporting stage and are distinct from the way a classification metric is aggregated across labels.

#### Sentiment in individual sentences

Test F1 on MeMo sentence sentiment classification MeMo-BERT-3 leads narrowly over DanskBERT, while both runs trained from scratch score below the contemporary baselines.

**The numbers**

| System or setting | F1 |
| --- | --- |
| MeMo-BERT-3 (this paper) | 0.77 |
| DanskBERT | 0.76 |
| Danish BERT BotXO | 0.74 |
| ScandiBERT | 0.73 |
| DanBERT | 0.63 |
| MeMo-BERT-2 | 0.59 |
| MeMo-BERT-1 | 0.56 |

MeMo-BERT-3 has the highest reported mean on the sentiment test set, with F1 of 0.77. DanskBERT follows at 0.76. Danish BERT BotXO and ScandiBERT also perform competitively, at 0.74 and 0.73, respectively. The result shows that systems whose earlier training drew mostly on contemporary sources can already do well on this historical sentence task after seeing its labels. For the system that receives an extra stage on MeMo, the measured advantage over its own starting point is narrow on this split.

The validation ordering is the same as the test ordering. MeMo-BERT-3 leads at 0.78 and DanskBERT follows at 0.75. Danish BERT BotXO has validation F1 of 0.74, ScandiBERT has 0.73, and DanBERT has 0.65. Among the runs started from random parameters, MeMo-BERT-2 records 0.58 and MeMo-BERT-1 records 0.52 on validation. Their test F1 scores of 0.59 and 0.56 also place them below all four baselines. Exposure to MeMo from the start of training, under the schedules used here, therefore yields a lower sentiment score than each of the existing systems.

There are two practical readings of this comparison. If the question is which configuration has the best reported mean for sentence sentiment in MeMo, the continued-training configuration leads on both splits. If the question is whether the historical stage makes a large difference to the existing Danish system on the test set, the two test scores are close. The same experiment supports a stronger distinction between retaining earlier training and starting from scratch under the reported configurations. These are comparisons of the observed results, with the paper giving means for the repeated runs.

#### Uses of fate in context

Test F1 on MeMo word sense disambiguation for skæbne MeMo-BERT-3 leads the field, with its advantage over DanskBERT more pronounced than in the sentiment test.

**The numbers**

| System or setting | F1 |
| --- | --- |
| MeMo-BERT-3 (this paper) | 0.61 |
| DanskBERT | 0.46 |
| MeMo-BERT-1 | 0.43 |
| DanBERT | 0.41 |
| ScandiBERT | 0.40 |
| MeMo-BERT-2 | 0.35 |
| Danish BERT BotXO | 0.30 |

On the fate test set, the highest F1 is 0.61 for MeMo-BERT-3. DanskBERT is again the strongest baseline and scores 0.46. The other scores occupy a wider range than the leading pair on sentiment. MeMo-BERT-1 places above DanBERT and ScandiBERT on this split, with F1 scores of 0.43, 0.41, and 0.40, respectively. MeMo-BERT-2 scores 0.35, and Danish BERT BotXO scores 0.30. Here the additional training stage coincides with a more pronounced gain over DanskBERT than it does on the sentiment test.

On validation, MeMo-BERT-3 is again first at 0.55 and DanskBERT second at 0.52. The next two positions reverse the order of the scratch-trained systems seen on the test set. On validation, MeMo-BERT-2 scores 0.44 and MeMo-BERT-1 scores 0.41. Below them, ScandiBERT records 0.40, DanBERT 0.39, and Danish BERT BotXO 0.19. The best configuration is the same on both splits. The relative performance of several other systems depends on which part of the annotated collection is used.

The outcome concerns agreement with the benchmark's supplied categories. The fate test gives the system the passages found by the search procedure and evaluates classification of those passages. A score for this setup measures something narrower than the success of a system that has to discover every literary discussion of fate. A passage can express views about human responsibility or the forces that govern a life without containing a match for a target form. Conversely, a matching compound can appear in a phrase that gives little evidence about a worldview. The categories and the way passages were found jointly define the result.

#### Reading the two tasks together

The same preparation strategy leads both evaluations, but the tests reward different kinds of prediction. The sentiment system classifies a sentence using an existing label scheme. The fate system classifies a window around a target expression using a newly created scheme where ambiguity is itself a category. The training allocations, example lengths, and label distributions differ. Comparing methods within a task and split gives a direct comparison against the same target. Comparing raw scores across the tasks entangles these other properties with whatever makes a task difficult.

The scores also qualify a broad claim that historical pretraining consistently beats training on mostly contemporary text. MeMo-BERT-3 supports that account in the reported comparisons with the baselines, and the contrast with DanskBERT shows what the targeted stage adds in the strongest configuration. The two runs trained only on MeMo provide a different result. Both finish below DanskBERT on every reported split. Their positions relative to the other baselines vary by task. The evidence favors continued training as implemented in MeMo-BERT-3, with some benefit from historical-only training relative to particular baselines in the fate task.

### What the ablations show

The paper reports no formal ablation that removes one component while holding the rest fixed, but it offers comparisons with the starting system, between training from scratch and continued training, and across tasks and splits.

#### What changes after the extra training stage

The comparison between MeMo-BERT-3 and DanskBERT comes closest to a controlled answer about the historical stage. DanskBERT supplies the initial parameters for MeMo-BERT-3 and is also evaluated directly. Both systems are then trained to predict the same labels through the same task-level protocol. The change of interest is the additional practice on the MeMo text. This makes the comparison more informative about historical adaptation than a comparison between unrelated systems whose designs and entire training histories differ.

The extra stage is associated with higher reported F1 on both splits in both tasks. Its advantage is especially apparent on the fate test set, where DanskBERT records 0.46 and MeMo-BERT-3 records 0.61. On the corresponding validation set, the scores are 0.52 and 0.55. Their ordering agrees across the splits, while the size of the advantage varies. For sentiment the same direction holds with closer test scores. The evidence for adaptation is therefore strongest when stated as a result for these runs and tasks, with the split identified.

The added stage introduces several properties of the data together. MeMo supplies writing from the target period, sustained exposure to novels, and exposure to the same collection from which benchmark material is drawn. Any of these properties could affect how well the later classifiers use their labeled examples. The study has no matching run that continues training DanskBERT for the same schedule on another kind of text. Accordingly, the comparison measures what the specific extra stage contributes. The effect of period alone, with genre and collection familiarity controlled, remains undetermined.

#### What the randomly initialized runs clarify

The scratch-trained systems demonstrate that access to the historical collection is insufficient by itself to reproduce the best numbers in this study. The larger scratch configuration, MeMo-BERT-2, has the same reported layer count, hidden dimension, and number of heads as MeMo-BERT-3. It still differs in both initialization and vocabulary size. MeMo-BERT-1 differs in further architectural settings. Their scores tell us how complete training configurations compare. They leave the individual contributions of vocabulary, parameter history, and architecture unresolved.

Within the scratch-trained pair, MeMo-BERT-2 scores higher on sentiment validation and testing. It also scores higher on fate validation. The fate test set reverses that last ordering, giving MeMo-BERT-1 an F1 of 0.43 and MeMo-BERT-2 an F1 of 0.35. This reversal limits what the pair can establish about the benefit of the larger design. The comparison varies several settings together, and the relative result changes with the target and split. The continued-training configuration is more consistent in where it ranks, finishing ahead of the scratch-trained pair in every reported comparison.

DanskBERT's competitive results give some context for the value of that earlier training. Its training data already included Danish literature along with other genres and periods. The paper treats this mix as a reason to take DanskBERT seriously on historical examples. Its performance is consistent with the idea that broadly trained encoders can bring useful knowledge to the task before specialized training. The experiment lacks a version of DanskBERT trained on the same sources with the literary material removed, so it leaves the particular contribution of that material open.

#### What the annotation comparison adds

The agreement study addresses the target labels independently of the comparison between encoders. Two scholarly readers agreed on 69 of 100 fate segments, with kappa of 0.56. The disagreements indicate that a portion of the benchmark asks for judgments on which informed readers can differ. Ambiguity is represented by one class, but deciding that an example belongs in that class can itself involve interpretation. A scholar might find the context sufficient to favor one reading where another scholar keeps several readings open.

The agreement numbers and the systems' F1 scores answer different questions. The agreement statistics describe how two annotators labeled a subset of the segments. F1 relates predicted categories to the reference labels in a benchmark partition. The reported agreement therefore helps interpret the nature of that benchmark, while leaving the relation between individual annotation disagreements and classification errors unknown. The paper does not provide a class-by-class account of where the annotators disagreed or where the best system gained ground. The overall improvement could come from several categories, and the results give no direct basis for assigning it to any particular interpretive distinction.

### Limitations

#### Limits stated by the authors

The authors define the scope of the work around MeMo. The systems were trained for literary questions on that collection and tested on annotated examples from it. An independent historical collection might differ in spelling, physical condition, genre, language use, or how its examples are labeled. The authors cite early nineteenth-century Danish folk legends associated with H. C. Andersen as an example of historical material outside the evaluation. They leave suitability for other periods, genres, and geographical or cultural settings to future testing.

Even within MeMo, the authors caution that the annotated datasets are small and may represent the full collection unevenly. A corpus of 839 novels can include works that scarcely resemble a particular annotated sentence or passage. A single average over a task test set leaves room for uneven performance across authors, periods, and styles. The project has a literary reason to select sentiment and fate, and the labeling was shaped by scholars working on those questions. That connection establishes relevance to the inquiry. Representativeness across the collection is a separate question.

The data statement also records limits of the text preparation. It estimates that OCR errors or incorrect corrections can remain in 2-3% of tokens in the basic text layer. The normalized layer and the automatic grammatical annotations lack error estimates. The metadata were curated by people, and the authors allow for occasional mistakes there too. These limitations affect different parts of the pipeline. An OCR error can alter a word form or a match for the fate search. An error in a publication year concerns a field used in organizing material for evaluation. The paper reports the quality issues at the corpus level without measuring their separate effects on the classifiers.

The authors describe collecting historical newspapers and additional novels, testing transfer on historical material outside the pretraining collection, and expanding the set of annotated tasks as future work. Among the proposed tasks are event extraction and [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), which identifies mentions such as names in text. The study's empirical coverage is sentiment and word use in the tested MeMo material. Its discussion of these other tasks sets out directions the authors wish to investigate.

#### Limits that follow from the design

The protocols distinguish examples used for task fine-tuning from examples used for task testing. There is also a separate distinction between training and validation text for the masked-token objective. The article describes the labeled datasets as drawn from the same corpus as historical pretraining and supplies no account of excluding the benchmark passages or their source novels from the pretraining pool. As a result, the results establish performance on held-out task labels within a shared textual collection. The experiment cannot determine how much of the performance would carry to novels absent from the historical stage. Shared source material also does not, by itself, establish that any particular test passage was seen in pretraining or that recalling it explains a result.

The split descriptions answer different questions from a publication-year analysis of language change. For fate, the authors use the year of each segment when partitioning the dataset. They do not list the year ranges or provide scores by year, by novel, or by author. In the sentiment task, they preserve the earlier sentence split. The aggregates support comparisons on the partitions as defined. A claim about predicting later writing from earlier writing, or about comparable performance for each part of the period, would require knowing how the years and works are represented and how the errors are distributed.

The paper reports mean F1 across seeds, without reporting the individual runs or an uncertainty interval. The results give the order of the systems' reported means. The stability of a narrow lead under different seeds or a new sample of passages remains unknown. The 4% test allocation for sentiment gives particular reason to keep the interpretation anchored to that split. The omitted class-by-class results also limit the reading of the aggregate. For instance, the sentiment score alone cannot tell a reader whether continued training improved recognition of neutral sentences or had most of its effect on the negative and positive categories.

There is a related limit for the fate categories. An overall F1 gain leaves open whether the system became better at distinguishing secular or material accounts from religious or metaphysical ones, at recognizing conventional language, or at assigning the ambiguous label. The distinction matters because the first two categories are central to the original literary inquiry and represent smaller parts of the labeled set. Two systems with different strengths across those categories can have a similar aggregate result. To use classification outputs to estimate the relative prevalence of the historical interpretations, a researcher would need to understand which cases the classifier tends to confuse and whether those confusions change across works or periods.

The fate search also sets a boundary around what has been annotated. It begins with occurrences of *skæbne* and related forms. This makes it possible to study how these forms are used, including where they appear as conventional language. A broader history of the concept would also need evidence from passages that express the idea through other words or through the way a narrative explains events. Likewise, the reference labels apply to the context supplied to the annotator. A judgment that remains ambiguous in a nine-sentence segment might become clearer in the larger work, and a reader's interpretation of an apparently clear segment might shift in light of later events.

The mixed written corpus presents a further question of scope. The authors' historical rationale for treating Danish and Norwegian writing together is part of the setup. Their aggregate results do not show whether the systems perform comparably on books by authors of different nationalities, on different dialect features, or on works by women and men. Publication in Denmark and the other selection rules define the collection's reach. The results for the pooled data therefore leave open how accurately the systems handle particular subsets and how those subsets relate to literary production outside the corpus.

Finally, the study evaluates predictions of labels under fixed benchmark procedures. It does not measure whether researchers reach sound literary conclusions more efficiently with the classifiers, or whether applying them to all of MeMo would recover the historical development that motivated the fate dataset. Such outcomes depend on the samples found, the consistency of the labels, and what errors do to any comparison between authors or years. The reported results provide a starting point for that kind of work through a tested classification setup and an annotated set of passages whose interpretation can be examined.

### What came after

[Noise, Novels, Numbers](https://md.research.elamur.ai/free/en/papers/laith-2024-noise-novels-numbers-framework-detecting/) (2024) cites the study and addresses the detection and categorization of noise in Danish and Norwegian literature. Its stated focus is a framework for investigating the condition of the text itself. That connects to an earlier stage in the MeMo workflow, where printed books become digital passages suitable for linguistic analysis. In the pretraining study, the quality of those passages enters as a condition on the evidence. The appendix documents correction procedures alongside the residual errors expected in the resulting text.

This connection matters because a feature of the historical writing and an error in its reproduction can both appear as an unusual form in the digital corpus. They call for different interpretations. A genuine historical spelling can carry information about a work or its period. A recognition error can change which words are found by a search and which token sequences an encoder receives. Research that distinguishes kinds of noise therefore addresses a problem that precedes both the masked-token stage and the extraction of examples for the fate benchmark. The citation establishes a connection between the studies. Whether the later framework reused the trained systems or measured how identified noise affected their F1 scores remains unspecified.

## Cite

Cite as Ali Al-Laith, Alexander Conroy, Jens Bjerring-Hansen and Daniel Hershcovich. 2024. Development and Evaluation of Pre-trained Language Models for Historical Danish and Norwegian Literary Texts. Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024).

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

```bibtex
@inproceedings{allaith2024development,
  title = {{Development and Evaluation of Pre-trained Language Models for Historical Danish and Norwegian Literary Texts}},
  author = {Ali Al-Laith, Alexander Conroy, Jens Bjerring-Hansen and Daniel Hershcovich},
  booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
  year = {2024},
  doi = {10.63317/2ixrvppuoo96},
  url = {https://doi.org/10.63317/2ixrvppuoo96}
}
```

> 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)
