---
title: "An Unsupervised method for OCR Post-Correction and Spelling"
description: "How an unsupervised method learns to correct OCR errors in historical Finnish, and why modern spelling changes the way its results are scored."
canonical: "https://research.elamur.ai/free/en/papers/duong-2021-unsupervised-method-ocr-post-correction/"
---
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/duong-2021-unsupervised-method-ocr-post-correction/)

[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/) / An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish

# An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish

Paper · 2021 · Quan Duong, Mika Hämäläinen and Simon Hengchen

**Authors:** Quan Duong, [Mika Hämäläinen](https://md.research.elamur.ai/free/en/authors/mika-hamalainen/) and [Simon Hengchen](https://md.research.elamur.ai/free/en/authors/simon-hengchen/) · **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/)

[**12** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3105131577|W3166943764) · [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.24/)
- [PDF](https://aclanthology.org/2021.nodalida-main.24.pdf)
- [DOI 10.5281/zenodo.4242889](https://doi.org/10.5281/zenodo.4242889)
- [OpenAlex](https://openalex.org/W3166943764)

Citations: OpenAlex, 2026-10-14.

## Summary

A newspaper can be read correctly by a person and still be difficult to search or analyse if the software that digitised it has misread the print. Optical character recognition, or OCR, turns the marks on a page into text. This paper asks how to repair the resulting Finnish text when there are no manually corrected pages to train on. An error detector has to contend with [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/), the system that gives Finnish words their many grammatical forms. It also has to contend with spelling change. A string unfamiliar to a contemporary tool might be a misreading, a valid inflection, or a spelling the newspaper used at the time.

The authors collect likely examples of OCR damage from a historical newspaper archive. They look for words that occur in similar surroundings and have similar spellings, using a Finnish word analyser to help recognise legitimate forms. The resulting pairs supply a comparison system and can also be used in reverse. In that direction, they teach a generator to introduce likely OCR errors into clean modern news. The paper compares this learned corruption with random insertions, deletions and replacements. Either way, the original news word supplies the answer for a character-level [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) to recover. The corrector can read an isolated word or see its neighbours, and each prediction concerns the central word alone.

On the Finnish Fraktur benchmark, every corrector's immediate output has lower exact word accuracy than the untouched OCR it received. Inspection shows that the discrepancies include both invented forms and legitimate modern spellings. The reference expects `lukuwuoden`, for example, where the corrector can produce the contemporary `lukuvuoden`. The authors test a further pass that falls back to the OCR reading when the proposed word fails morphological analysis, then changes `v` to `w` to approximate a common historical convention.

With that pass, the corrector trained on learned errors and given a window of 3 words reaches 79.26% on OLD and 83.50% on FR11. The paper reports improvements of 3.92 and 3.71 percentage points over their respective OCR outputs. Tesseract begins at 88.29%, and its strongest correction setting reaches 84.00%. The authors show that the losses on Tesseract's many initially correct words outweigh the repairs to its errors. The study thus measures how much the procedure can improve a historical transcription, while its examples show how the same training can also produce contemporary spellings that a historical reference will mark wrong.

## Deep dive: An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish

This study tests whether simulated OCR errors can help repair historical Finnish newspapers and how spelling conventions affect the results. · about 34 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

#### Reading the print and interpreting the word

OCR and post-correction begin with different evidence. OCR has the page to work from. In this study the post-corrector starts from the characters that the OCR system returned. It can consider whether those characters look like a Finnish word and, in some experiments, how they fit with nearby words. If an engine consistently mistakes one letter for another, the corrected text may be recoverable from those clues. The image that would let a reader inspect the original letter is outside the correction procedure.

A dictionary lookup offers an appealing first check. A spelling absent from the dictionary might be an OCR error. In Finnish, that inference is particularly risky. A dictionary headword can stand for a family of inflected forms, and the word as it appears in a sentence can have an ending missing from the headword. Grammatical information resides in those differences. If a procedure interprets a legitimate ending as damage, it can replace a useful part of the text while apparently making the word more familiar.

Historical material makes a direct dictionary comparison harder still. The authors note that Finnish inflections have changed over time and that some older forms are now rare or have fallen out of use. A recogniser developed around contemporary examples can have trouble identifying a word that was completely ordinary in the newspaper. This affects training as well as correction. If the recogniser is used to decide which strings count as likely errors, an older form it cannot analyse may end up on the error side of a training pair.

[Historical linguistics and language change](https://md.research.elamur.ai/free/en/topics/language-change/) also bear on what the target should be. A transcription can record the spelling found in print. A normalised version can express the same word in a contemporary form. The two versions can preserve the same reading of the text while differing in a character. In the paper's setting that is enough to change a benchmark decision, because the reference contains historical spellings and the training material used for the proposed correctors is modern. Repair and normalisation are therefore related operations whose success requires different reference judgments.

There is also a difference between knowing that a string is possible and knowing that it belongs in a particular passage. An OCR substitution can produce a perfectly recognisable word. Likewise, an unfamiliar string can be the proper transcription of a form missing from modern resources. Morphological analysis makes it possible to recognise legitimate inflections that a lookup of headwords would miss. The intended reading still depends on the evidence available for the particular word, such as its spelling and surroundings.

#### Why the quality of digitised text mattered

The paper situates the problem in humanities research that draws on collections digitised by libraries and other institutions. Once newspaper pages are available as text, researchers can run procedures that look for recurring patterns across many documents. The procedures receive whatever the recognition system recorded. An OCR mistake can affect a result if it disrupts the features that procedure uses. The authors review earlier work because how much disruption matters depends in part on the analysis being attempted.

Hill and Hengchen examined that question with material from Eighteenth Century Collections Online and its keyed-in counterpart. Their comparison suggested a limited effect of OCR noise on the quantitative analyses they considered. The Finnish paper describes broadly similar findings from earlier research on [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), the identification of mentions such as names, and on authorship attribution. These examples gave the authors reasons to distinguish the accuracy of the text itself from the behaviour of any particular procedure that uses it.

The paper also discusses less reassuring evidence. Mutuvi and colleagues found an effect when doing [topic modelling](https://md.research.elamur.ai/free/en/concepts/topic-modeling/) on historical newspapers. That task uses recurring patterns in the text to identify topics. Van Strien and colleagues found that the effects of OCR noise varied considerably across the downstream tasks they examined. A recognition error can matter to one form of analysis while having little influence on another. The question of whether a collection is accurate enough is consequently tied to what a reader or researcher wants to do with it.

The authors cite research agendas and institutional reports that put OCR quality among the concerns of digitisation and cultural heritage work. They also point to investigations of recognition in British and Swedish newspaper collections and to a wider project involving national libraries. At that scale, asking someone to correct each page creates a practical obstacle. An automatic method is of particular interest where large quantities of OCR text are already available and there is comparatively little verified material from which to learn.

Finnish is the test case, and the authors see related difficulties for languages such as Erzya, Sami and Komi. They describe historical books that would be valuable in digital form and limited support from language technology. They also mention previous work showing that recognition for endangered languages can benefit from restricting the domain in which an OCR system is trained and used. That approach addresses the recognition stage. This paper deals with the situation after recognition, when someone already has a transcript and wants to make better use of it.

#### How correction had been attempted

The paper describes earlier Finnish OCR correction using weighted finite-state methods, including work by Drobac and colleagues. It also discusses finite-state work by Silfverberg and Rueter for Finnish and Erzya. Finite-state methods work with patterns over sequences such as letters. A finite-state morphological analyser can encode relationships between surface spellings and dictionary forms, which is the use the Finnish study makes of such a resource during data preparation. It brings a related check back when reviewing proposed corrections.

Another line of work applies [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/) to a pair of strings in the same language. The input is a reading affected by OCR errors. The target is the text the system is supposed to recover. The paper mentions statistical machine translation in earlier historical normalisation work by Pettersson and colleagues. Among neural approaches to OCR correction, it describes Dong and Smith's use of word sequences, Hämäläinen and Hengchen's use of character sequences, and the use of [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) representations by Nguyen and colleagues in a system for English.

Translation supplies a way to learn repairs by example. A sequence-to-sequence corrector takes an ordered string and produces another one, so it can learn to return a spelling with a different number of characters. It still needs pairs that say which output should follow a given input. A hand-corrected transcription aligned with the OCR reading can supply both parts of a pair. The authors set out to remove the need for that kind of training collection, which takes time to prepare.

The immediate predecessor was Hämäläinen and Hengchen's method for English. Its starting observation was that OCR variants and the words they came from could have similar distributions in an archive. A word that is occasionally misread can appear in the intact spelling and in a damaged spelling in the same sorts of surroundings. Comparing the surroundings can therefore help locate candidates for character-level correction. The Finnish authors see two reasons to extend the approach. A headword list is a poor proxy for the range of intact forms in Finnish, and near neighbours in a particular passage can give the corrector evidence that an isolated word lacks. Their design uses the archive to find plausible errors and a separate source of clean text to expand the supply of correction examples.

### The method, step by step

#### Creating a mistake when the answer is already known

Suppose a clean word is available before any error is introduced. The word can be altered to resemble an OCR mistake and given to a corrector, with the original spelling serving as the desired output. This reverses the practical problem of finding training data. Looking at an error in an archive leaves the intended reading uncertain. Starting with a clean word makes the intended reading definite for the generated example. The remaining question is whether the alterations are representative enough to prepare the corrector for authentic OCR.

The paper takes two approaches to that question. Its simplest generator selects and applies ordinary character edits at random. Its learned generator uses probable errors extracted from a newspaper archive to imitate the kinds of changes that occur in real OCR. The extraction procedure also has a direct use. Probable pairs can train a corrector without the generation step, and the authors use that route for their comparison system, NATAS. The same pair can therefore play different roles depending on which spelling is supplied as input.

The proposed correctors operate on letters and have the option of receiving the words near a suspected error. The example given to the corrector has a designated centre. At training time the clean version of that centre is already known, and at evaluation time the centre is an actual OCR token. The extra words affect the prediction without becoming part of the returned text. The final evaluation can then compare the resulting central word directly with its counterpart in a reference transcription.

Learning to repair Finnish OCR with generated errors The steps in order.

#### Using the archive to find possible pairs

The archive for this stage is the Historical Newspaper of Finland, covering 1771 to 1929. The authors train Word2Vec with Gensim. Word2Vec supplies [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), numerical representations obtained from patterns of word use. The representations let the authors search the vocabulary for words found in similar kinds of surroundings. A recognisable spelling and a recurring OCR variant can end up close to each other by this measure, because they sometimes occupy the same role in the text. The same measure can bring different words together, which makes this a proposal stage. [Efficient Estimation of Word Representations in Vector Space](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/)

The vocabulary needs a way to distinguish forms with some lexical support from forms that might be damaged. For each vocabulary entry, the authors use Omorfi, the Finnish finite-state analyser made available through UralicNLP, to obtain its [lemma](https://md.research.elamur.ai/free/en/concepts/lemma/), or dictionary form. They check that form against lemmas from Finnish Wiktionary. A match earns the original vocabulary entry a place on their accepted list. The unit that goes on the list can therefore retain its grammatical ending even though the criterion for admission is a dictionary form.

This distinction is easy to lose when the object of analysis is already a string of letters. The lookup asks whether a particular surface form can be related to a known headword. The eventual correction still needs to recover the inflected word as used in the text. A procedure that returned its lemma every time could pass the dictionary check while removing the information the correction task was meant to preserve. Here the lemma helps decide what counts as a possible clean training example.

The next step starts with an accepted word and finds its neighbours in the Word2Vec vocabulary. The authors separate neighbours that belong to the accepted list from those that fall outside it. The latter group provides possible OCR variants. They test the spelling of a candidate with Levenshtein distance. This is the smallest number of single-character insertions, deletions and substitutions that can turn one string into another. The authors admit a distance of at most 4, a cutoff they selected empirically.

The checks address different sources of ambiguity. The embedding looks for related usage. The analyser and list provide evidence about which spellings are recognisable. The distance cutoff looks for a transformation that could plausibly connect the strings by character edits. Agreement across these checks puts a pair in a better position to be useful. It remains possible for an unrecognised neighbour to belong with a different familiar word, especially when the words are semantically related and close in length.

The procedure produces groups of plausible intact and damaged forms and pairs their members for training. In the paper's example, `joleen` is paired with `jokeen`, the Finnish form glossed as entering a river. The corrector reads the letters of `joleen` and is taught to output the letters of `jokeen`. In the archive itself, the evidence for the association comes from the extraction procedure. The intact side of the pair is an inferred training target.

NATAS is trained directly on these fixed examples. The authors use OpenNMT's default setup for the experiment, a bidirectional long short-term memory network with global attention. The long short-term memory component is recurrent, meaning it updates a state as positions in a sequence are processed. The bidirectional encoder reads in both directions. Global attention lets the decoder draw on the input positions as it decides what to emit. The run lasts 10,000 steps, and the authors use the checkpoint saved at the end. [Effective Approaches to Attention-based Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/luong-2015-effective-approaches-attention-based-neural/)

Two constraints of the archive procedure motivate the move to artificial examples. The first is the uncertainty about whether a proposed error and a recognised word really correspond. The second is the number of variants the procedure can find. Its candidates come from a Word2Vec vocabulary built with a frequency threshold. A plausible error may occur too rarely to be represented there, and many variations that could train a useful repair will never appear as mineable neighbours. Generation gives the authors a way to produce more examples while keeping control of the intended output.

#### Corrupting clean news at random

The clean text comes from Yle News. The corpus contains more than 700 thousand Finnish articles from 2011 to 2018. The authors remove punctuation and characters outside the Finnish alphabet before [tokenisation](https://md.research.elamur.ai/free/en/concepts/tokenization/), the division of the cleaned text into units that can be treated as words. A chosen news word can now be altered, and its original token supplies the desired output. The placement of that token in its passage also supplies the surrounding text when a corrector is being trained to use context.

The random generator uses deletion, addition and replacement. For each of these operations it draws a random value between 0 and 1. The operation is considered when the draw is smaller than the product of the word length and the noise rate, which is 0.07. The procedure then chooses a position at random and checks that the character there belongs to `abcdefghijklmnopqrstuvwxyzäåö`. It uses that alphabet when adding or replacing a character.

The length term makes the proposed corruption more likely on longer words. The paper uses a word of 15 characters to illustrate a length at which the test will always propose an error. The generator makes a fresh decision for each kind of edit. It can consequently produce several kinds of damage in the same example or leave a word as it was. The noise rate governs the operation checks. It is a setting of the generator, and the proportion of characters ultimately changed depends on the individual words and draws.

These edit types correspond to recognizable outcomes of a machine reading print. A letter can disappear, an extra letter can be reported, or a word can contain a substitution. The random generator captures those broad possibilities with very little machinery. It gives no special preference to letters whose printed shapes make them natural confusions. This makes it a useful comparison for a generator that can acquire such preferences from an archive.

#### Teaching a generator to imitate OCR

For the learned generator, the probable archive pairs are turned around. The recognised form becomes the input, and the variant becomes the desired output. The generator practises damaging words. The authors give the example of `i` and `l` as a more plausible OCR confusion than `i` and `g`. One purpose of learning from the archive is to let recurrent patterns like these influence the generated data without requiring the authors to enumerate them as rules.

This direction of training has a particular difficulty. Frequently the clean string and its erroneous counterpart share much of their spelling. A generator can produce many of the right characters simply by reproducing its input. In the authors' OpenNMT experiments with the default training objective, the generator eventually returned the source unchanged. That behaviour would leave the corrector with little practice at undoing the intended corruption. The paper therefore gives the learned generator an objective that rewards resemblance to the archive error and penalises resemblance to the input.

The authors write the cross-entropy term as follows.

```
cross_entropy(H, T) = −(1/n) ∑ᵢ₌₁ⁿ [t⁽ⁱ⁾ ln h⁽ⁱ⁾ + (1 − t⁽ⁱ⁾) ln(1 − h⁽ⁱ⁾)]
```

`H` is the set of predicted outcomes and `T` the set of target outcomes. The index `i` picks out a corresponding prediction `h⁽ⁱ⁾` and target `t⁽ⁱ⁾` from the two sets. There are `n` such entries. The summation sign `∑` adds the bracketed terms for `i` from `1` through `n`, and `/n` divides the sum by the number of entries. `ln` is the natural logarithm. The expressions `1 − t⁽ⁱ⁾` and `1 − h⁽ⁱ⁾` give the complements of the target and prediction for the second term. Juxtaposition denotes multiplication, `+` adds the terms, and the leading minus sign gives the loss its sign. Lower cross-entropy corresponds to predictions that assign more probability to the specified targets.

The generator combines cross-entropy with its reciprocal evaluated against the clean input.

```
loss = cross_entropy(Ŷ, Y) + 1 ÷ cross_entropy(Ŷ, X)
```

`loss` is the quantity the generator is trained to minimise. `Ŷ` is the predicted output, `Y` the desired damaged spelling from an extracted pair, and `X` the clean input spelling. `cross_entropy` is the function defined above. The `+` adds the term calculated against `Y` to the reciprocal of the term calculated against `X`. The `÷` divides `1` by that second cross-entropy. As predictions become more like the clean input, the denominator can become small and the added penalty grows. The first term still gives the generator a reason to produce something resembling the archive variant.

The architecture implementing this objective is a recurrent encoder and decoder. Each has a character embedding layer with 128 dimensions and a gated recurrent unit, or GRU, with 512 hidden units. The embedding gives each character a numerical representation for the recurrent computation. The encoder represents the source sequence, and the decoder uses that representation as it constructs the output. At each step it joins the source representation, its hidden context and the embedded character supplied to it. A linear layer turns the joined representation into a prediction for the next character.

The generator is trained with teacher forcing at a rate of 0.5. In this procedure, an input character for the decoder can come from the known target sequence. The alternative is to feed in the character that received the highest score in the preceding prediction. Using the target lets the decoder continue from a correct prefix of the intended error. Using a prediction lets it continue from a prefix it has begun to produce. This part of the training concerns the generator's ability to return a damaged form. The later corrector uses ordinary cross-entropy and goes in the opposite direction, from a damaged form back to the original.

Learning how to corrupt words and knowing what a generated word ought to be are separate matters. The generator's data contain uncertain links between archive spellings. Once it is applied to a word from Yle News, the original of that particular generated example is known. This preserves the benefit of definite targets even if some archive pairs gave the generator imperfect evidence about which alterations to make.

#### Presenting a word with its neighbours

The correction stage uses a Transformer implemented in PyTorch. The authors motivate this choice with the serial computation required by recurrent processing and with the ability of attention to connect positions in a sequence. Attention lets a position draw on information from other positions. Multiple heads allow a layer to make several such combinations. A learned positional representation gives the system information about where the characters and special markers occur. The paper's implementation uses 3 layers in the encoder and 3 in the decoder, each with 8 heads of self-attention. [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/)

For a contextual example, the authors draw a window of words from the text and select its middle word for corruption. The other words stay in the input as context. This requires an odd window size. The tested sizes are 1, 3 and 5. Size 1 is the case where the input consists of the target word alone. Size 3 gives the immediate neighbours, and size 5 extends the context farther along the passage. The decoder always has the same responsibility, to produce the clean form for the designated position.

Because the input is treated as a sequence of characters, the authors add markers that indicate the roles of different parts. The `<sos>` marker begins the sequence and `<eos>` ends it. A `<ctx>` marker separates the centre from the context on each side. When a side contains several words, `<sep>` marks their boundaries. The optional `<pad>` marker allows examples of different lengths to occupy a batch. These are structural markers, so the decoder can distinguish the spelling to be recovered from evidence that happens to sit beside it.

The paper illustrates this with the placeholder `target`, which the generator changes to `farget`. In a contextual input, the letters of `farget` occupy the section between the context markers. The corresponding desired output consists of the boundary markers and the characters of `target`. This representation also helps explain what it means to use a wider window. The corrector can inspect a longer input while learning to return the same kind of answer. It is never asked to produce the entire span of neighbouring text for that example.

The corpus is sampled through a dynamic data loader. It generates damaged forms for each mini-batch while training, giving the corrector opportunities to see fresh variants. NATAS instead has the fixed pairs collected from the historical vocabulary. Here the clean word associated with a particular occurrence stays available as the answer even when a subsequent batch presents a different version of the error.

The authors train with a batch size of 256 and use [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/) to update the corrector's parameters. They fix the learning rate at `5 · 10⁻⁴` and report better convergence than with the default `0.001` in their experiment. The loss is cross-entropy on the desired correction. Combining the generators and window sizes gives 6 settings. The names containing `Rand` denote random corruption, those containing `Train` denote learned corruption, and the suffix identifies the window size. Thus `TFTrainW3` can be read as the Transformer trained on learned errors using a window of 3 words.

The paper reports convergence after around 20 epochs, meaning passes through the training data. The reported training losses are roughly 0.064 for learned corruption and 0.059 for random corruption. Because the source of the input errors changes, these losses describe performance on different generated reconstruction tasks. Testing on observed OCR is the step that shows which training conditions yield useful repairs. The authors made the source code available through GitHub and the trained systems through Zenodo.

### Experiments and results

#### The benchmark and the unit being scored

The evaluation uses the Ground Truth Finnish Fraktur collection from the National Library of Finland. It has 479 pages of newspapers and journals dated 1836 - 1918. The aligned data contain 471,903 lines representing words or characters. The relevant columns associate a historical reference with output from Tesseract, OLD and FR11. The authors apply each correction procedure to each OCR stream separately and compare it with the reference corresponding to that stream.

They remove blank entries where OCR supplied no result and exclude tokens with non-alphabetic characters to match the alphabetic training setup. The material retained for Tesseract contains 458,799 tokens, with 88.29% word accuracy before correction. For OLD, the retained set has 464,543 tokens and 75.34% starting accuracy. For FR11, it has 470,905 tokens and 79.79% starting accuracy. These counts specify the population for each comparison. The streams come from the same benchmark collection, and the filtering leaves a different set of eligible tokens for each.

A word counts as correct when the entire output string agrees with the reference. The authors choose that metric over character-level accuracy because they regard it as a more realistic test and because long Finnish words make exact matching demanding. Suppose the correction fixes a letter in a word and another mistaken letter remains. The character sequence can be closer to the reference, while the word still scores as wrong. A modern spelling can likewise score as wrong when one character differs from the historical reading. The metric answers a clear transcription question while leaving those distinctions to the qualitative inspection.

For NATAS the authors use OpenNMT's default decoding settings. The isolated-word correctors receive the OCR token by itself. The contextual variants use a sliding window over the OCR text, so the neighbouring words can themselves be affected by recognition errors. The Transformer decoding uses beam search of width 3. Beam search carries competing partial output sequences forward as letters are generated. At the end the sequence with the highest probability is returned for the central token.

#### What the first predictions get right

The first evaluation uses each prediction as decoded. NATAS scores 63.35% on Tesseract, 61.63% on OLD and 64.95% on FR11. Training with artificial errors improves on NATAS in all three streams. For instance, when the training corruption is learned and the window is 5, the correction accuracy is 71.24% on Tesseract, 69.30% on OLD and 73.21% on FR11. With random corruption and the same window, the corresponding accuracies are 71.24%, 68.35% and 72.56%.

Every immediate result still falls below the corresponding untreated OCR. That includes the strongest direct prediction settings and the systems receiving the poorer initial transcriptions. Beating the archive-trained baseline shows that the new correctors make more predictions that agree with the reference than NATAS does. Beating the original OCR requires enough of those predictions to add correct words overall. The first results give a reason to look at the disagreements before concluding which part of the method is failing.

One type of disagreement is a change consistent with modern spelling. In the example of the word for the academic year, the immediate prediction `lukuvuoden` uses the contemporary `v` where the historical `lukuwuoden` uses `w`. Contemporary news makes spellings like the former appropriate targets during training. The benchmark assigns credit to the latter if that is what appeared in print. The authors identify this pattern as a reason that word accuracy against the historical reference can miss useful outputs.

There are also proposals that fail as contemporary words. The paper gives the example `samppaajaa`, which it discusses as a likely invention where `samppanjaa` is the plausible form. This kind of sequence raises a different question. The proposal may be close to a known Finnish word, yet there may be little linguistic reason to retain it. The authors address these two kinds of disagreement with a pass that acts on the decoded prediction before scoring it again.

#### Checking the proposal and adapting its spelling

The pass first gives the predicted word to Omorfi through UralicNLP. If that check fails, the system uses the original OCR token in its place. The purpose is to keep an implausible prediction from displacing the starting text. Having selected a word by this rule, the pass replaces `v` with `w`. The order matters because morphological analysis is applied to the correction proposal as decoded, and the replacement is applied to the selected output, which may be the fallback OCR reading.

The authors motivate the spelling adjustment with an earlier result from Kettunen and Pääkkönen. In their study, 3.3% of tokens contained `w`. The morphological analyser FINTWOL failed to recognise 97.5% of those tokens. Changing their `w` letters to `v` reduced the proportion not recognised to 30.6%. This earlier experiment moved the text towards contemporary spelling for analysis. The Finnish Fraktur correction experiment uses the inverse substitution to make contemporary-looking predictions closer to the historical reference.

The post-processed evaluation counts exact matches as before. It also reports performance separately for words that started out wrong and words that started out right. The recovery figure asks what fraction of the original errors become exact matches. The preservation figure asks what fraction of the original matches still agree with the reference after processing. Read together, the figures show both sides of the intervention. A pipeline can be helpful on the subset that needs repair and still be harmful overall if it disturbs too much of the much larger subset that was already right.

#### Tesseract begins with less room for repair

The best overall post-processed accuracy for Tesseract is 84.00%, using learned corruption with a window of 5. This is a substantial improvement over that setting's immediate predictions, while the untouched OCR is higher at 88.29%. NATAS reaches 74.71% with the same additional processing. The redesigned correctors thus offer a stronger basis for the lexical and spelling pass, but the best complete pipeline still yields a worse match to the reference than the original Tesseract transcription.

The strongest complete setting fixes 18.02% of the words Tesseract initially got wrong. It preserves 92.75% of the originally correct words. The authors report that 7.25% of those original matches are lost. The repair rate is larger than the rate at which correct words are lost, and the rates apply to very different groups. With correct tokens dominating the starting text, the damage to that group outweighs the repairs. The setting with a window of 3 reaches a slightly higher recovery rate, 18.15%, with overall word accuracy of 83.96%. Preservation matters enough that the larger window has the better overall score.

Finnish Fraktur word accuracy for Tesseract and its post-corrections The strongest corrected output improves on NATAS while the original Tesseract transcript retains the highest accuracy.

**The numbers**

| System or setting | Word accuracy % |
| --- | --- |
| Original Tesseract | 88.29 |
| NATAS after post-processing | 74.71 |
| Random errors, window of 5 | 81.89 |
| Learned errors, window of 3 | 83.96 |
| Learned errors, window of 5 (this paper) | 84.00 |

#### OLD and FR11 gain from the complete procedure

On OLD, 5 out of 7 correction settings surpass the starting accuracy of 75.34%. The leading setting uses learned errors and the window of 3. Its result is 79.26%, a reported gain of 3.92 percentage points. It repairs 36.03% of the original errors and preserves 93.41% of the initially correct words. Extending the learned setting to a window of 5 yields 79.17% overall. That setting preserves 93.50% of originally correct words, while recovery falls to 35.41%. NATAS after processing reaches 71.19%, so applying the same check and spelling change to the older corrector is insufficient to improve OLD.

Finnish Fraktur word accuracy for OLD and its post-corrections Learned errors with the middle window yield the most exact matches and improve on the original OLD output.

**The numbers**

| System or setting | Word accuracy % |
| --- | --- |
| Original OLD | 75.34 |
| NATAS after post-processing | 71.19 |
| Random errors, window of 5 | 76.26 |
| Learned errors, window of 3 (this paper) | 79.26 |
| Learned errors, window of 5 | 79.17 |

On FR11, 5 out of 7 settings also beat the untouched transcription. The window of 3 with learned corruption has 83.50% overall accuracy against the starting 79.79%. The paper reports a gain of 3.71 percentage points. That setting recovers 45.17% of the initially erroneous words and preserves 93.21% of the initially correct ones. The learned setting with a window of 5 reaches 83.34% overall. Its preservation score is 93.30% and its recovery score is 44.01%. After the extra pass NATAS achieves 75.06%, again below the uncorrected reading.

Finnish Fraktur word accuracy for FR11 and its post-corrections Both learned settings shown outperform the original FR11 transcription, with the middle window producing the best score.

**The numbers**

| System or setting | Word accuracy % |
| --- | --- |
| Original FR11 | 79.79 |
| NATAS after post-processing | 75.06 |
| Random errors, window of 5 | 81.09 |
| Learned errors, window of 3 (this paper) | 83.50 |
| Learned errors, window of 5 | 83.34 |

FR11 has the highest observed recovery rate on original errors among these results. OLD has the largest reported improvement in overall word accuracy. Those outcomes use different denominators. Recovery is measured only on the subgroup of words that needed repair. Improvement in overall accuracy reflects the original mix of correct and incorrect words, as well as the changes the pipeline makes to both. Tesseract makes the distinction especially clear, since some of its errors can be repaired even while the net effect is negative. The reported gains on OLD and FR11 apply to the pipeline after it adapts its predictions to historical spelling.

### What the ablations show

#### How changing the generator affects correction

The closest controlled comparisons hold the window size fixed and change how the synthetic training errors are produced. The correctors in those comparisons use the same source of clean text and the same correction architecture. Each system has definite targets for its generated examples. The experimental change is how it gets from a clean target to a damaged input. This helps distinguish the value of an archive-derived generator from the value of using artificial examples in the first place.

On direct predictions, the learned generator has the better word accuracy in most matched comparisons. At the window of 5 on Tesseract, the learned and random generators tie at 71.24%. After the additional lexical and spelling pass, learned corruption has higher overall accuracy at every matching window size in each OCR stream. The consistency across those settings supports the authors' idea that learning from archive errors can make generated training examples more suitable for repairing genuine OCR.

The FR11 results at the window of 3 show how the advantage can arise. The random setting reaches 80.06% after processing, with 37.00% recovery on initially wrong words and 90.96% preservation on initially right ones. The learned setting reaches 83.50%, with 45.17% recovery and 93.21% preservation. In this comparison the higher score comes with progress on both subsets. The learned corruption helps the system recover more of the damaged tokens and leaves more of the good readings in agreement with the reference.

Other comparisons qualify that conclusion. On Tesseract, the error recovery figures remain low even when the complete learned system has a large advantage over the corresponding random one. On OLD, some random settings still improve on the original OCR after processing. Training on random mistakes can therefore be useful with this pipeline, and learning from archive data offers a more effective version of it under the reported conditions. The absolute gain available still depends on which OCR stream receives the predictions.

The comparison changes the whole corruption procedure. The learned version uses extracted examples and an objective designed to discourage copying. The random version uses a length-dependent rule and pre-defined edit operations. A match in correction architecture and window size leaves open whether the gap arises mainly from familiar letter confusions, from the amount of corruption or from some combination of properties of the generated inputs. The paper shows the downstream effect of choosing one generator over the other without reporting a matched study of their edit distributions.

The training losses point in the opposite direction from the historical evaluation. The correctors trained on random errors reach the lower loss on their own generated data. That can happen when one reconstruction task is easier to learn from the examples supplied or when it requires different predictions. The losses show that the correctors converged in their respective conditions. The held-out task of repairing historical OCR supplies the evidence that the learned generator yields stronger corrections.

#### What changes when the window widens

The window comparisons ask whether nearby text can help settle the spelling of the central word. When the centre is isolated, the corrector can use the letters it received and the patterns acquired during training. With context, it can also use clues from the phrase. A grammatical ending that is hard to distinguish from an OCR mistake by inspection of a single string may be more predictable given neighbouring words. The reported results test whether access to that kind of evidence helps in aggregate.

Within both corruption settings, the window of 1 has lower overall accuracy than the wider choices across the evaluated OCR streams. The difference is visible before the final pass and remains after it. For random corruption on OLD, post-processed accuracy increases from 75.10% at the smallest window to 75.40% at the window of 3 and 76.26% at the window of 5. This is evidence for the utility of context even when the spelling mistakes used in training were generated without access to archive error patterns.

The choice between the wider windows is more conditional. With learned corruption, OLD and FR11 get their best post-processed overall results at the window of 3. Moving to 5 increases the share of original matches that remain right and decreases the share of errors that become right. Tesseract shows that same direction of change in recovery and preservation, and it gets its best overall corrected score at the window of 5. The cleanest contextual result is therefore the improvement from supplying some neighbours. The ideal extent of that context depends on what the corrector encounters and on the relative cost of its changes.

A larger window also changes the number of OCR characters presented at evaluation. Some additional neighbours can help identify the centre, while others may be themselves damaged. The paper varies the context as a whole. It gives no breakdown by the correctness of particular neighbours or by which side of the target supplied the important evidence. The experiments show that the width affects the balance of outcomes without locating the linguistic clue responsible for an individual repair.

#### How much the other comparisons isolate

The NATAS comparison answers whether the proposed package is an improvement on the adapted archive-pair approach. When the authors switch to the proposed system, they change the source of clean targets, the way errors are obtained, the way fresh examples can enter training and the architecture of the corrector. Some variants also receive wider input. Even the isolated-word settings, which remove the availability of neighbours as a difference, still bundle several changes. The comparison measures the package's advantage. Attribution to a particular architectural choice or training mechanism would need a more closely matched run.

The direct and post-processed comparisons give a separate test of the additional pass. The decoded sequences are the starting point in both measurements. After processing, an analyser may replace a proposal with the original token and the spelling rule may alter the output. The combined operation improves the reported word scores considerably. The authors give examples that motivate both parts. They do not supply individual benchmark scores for filtering alone or for letter replacement alone, so the relative contributions of those interventions remain open.

The repair and preservation breakdown makes it possible to interpret these comparisons without guessing from overall accuracy. In the Tesseract results it reveals a real ability to repair errors that is outweighed by losses on existing matches. In OLD and FR11 it shows that the settings with the highest overall scores need not also be the safest ones for words that already agree with the reference. The choice to inspect both groups is what gives the close window comparisons a concrete interpretation.

### Limitations

#### Where the authors identify failures

The authors explicitly identify Tesseract as unfinished business. Its starting text already contains a high proportion of correct words, and the tested pipelines disrupt enough of them to reduce overall accuracy. The lexical check removes some implausible proposals, but a word can pass that check and still be the wrong word in its position. The experiments show the consequences of applying the procedure to this stream. They leave open how to distinguish a valuable intervention from a change that should be avoided.

The authors also acknowledge that Omorfi can reject a useful proposal. Their example starts with the OCR string `mcntoistamuotiscn`. The system recovers the remaining part of `kolmetoistavuotisen` that the reference expects at that position. The initial `kol` has been separated by a line break in the data. Omorfi finds the recovered fragment invalid as a standalone Finnish word, and the processing rule discards it. This is a case where correct analysis of the input as an isolated fragment can lead to the wrong decision about the transcription.

The issue reaches beyond the coverage of a word list. A historical transcription can represent the character string found on one side of a line break. A morphological analyser is designed to recognise words, and its answer concerns the isolated string submitted to it. Those questions can have different answers even when the underlying word is familiar. Improving the filter, as the authors suggest, would involve criteria sensitive to what OCR and reference alignment can do to word boundaries.

The blanket `v`-to-`w` substitution is another limitation they state. It addresses a common difference between the writing in the collection and the clean contemporary targets. It cannot guarantee a historically appropriate spelling in every word. It can also undo a desirable instance of modernisation. The benchmark measures historical agreement after this adjustment, and the authors note that the system's ability to normalise could be better than such an evaluation makes it appear.

The paper calls the training procedure unsupervised in the sense that it does not start from pages manually aligned with correct readings for this training task. It still assumes access to OCR text, a vocabulary list, a morphological finite-state analyser and clean material. The authors point to dictionaries, finite-state resources and [Universal Dependencies](https://md.research.elamur.ai/free/en/concepts/universal-dependencies/) treebanks for languages related to Finnish. They discuss Komi-Zyrian, Erzya, Komi-Permyak and North Sami as examples of available resources and describe work with other languages as a future direction. The results reported here concern Finnish. [Universal Dependencies v1](https://md.research.elamur.ai/free/en/papers/nivre-2016-universal-dependencies-v1-multilingual-treebank/)

#### What the setup leaves unresolved

The benchmark quantifies historical transcription accuracy and gives examples of contemporary normalisation. A reader looking for an overall measure of normalisation quality would need a reference that specifies acceptable modern forms. This study's historical reference cannot resolve whether any particular modern-looking disagreement is a successful normalisation, an unintended word change or an implausible output. The illustrative cases establish that valid modernisation occurs. They leave its frequency and accuracy across the collection unmeasured.

Exact word matching also omits the degree of improvement within a token. A correction that removes one wrong letter and leaves another wrong has the same word-level outcome as a completely erroneous proposal. The authors deliberately use that strict metric. It gives strong evidence when a whole word is recovered and limited evidence about partial repairs. A study concerned with the residual burden on a human editor or with the number of remaining character errors would need measurements tailored to those questions.

The population of tokens matters as much as the metric. Blank OCR rows and tokens with characters outside the evaluated alphabet have been removed. The resulting figures apply to retained word readings. Restoring text where OCR returns nothing, repairing spans broken by page layout, and correcting punctuation are outside the reported measurements. The line-break example illustrates that even within the retained alphabetic material, the units presented for correction can reflect how the pages were segmented.

The archive pairs used by NATAS and by the learned generator are also uncertain in ways the final benchmark cannot quantify. The extraction procedure uses contextual proximity, morphological recognition and character distance to infer plausible relationships. It provides no independent confirmation for each proposed archive pair. The gains from learning corruption show that those pairs carry useful information in aggregate. The paper gives no estimate of the rate of correct pairings or of how the remaining ambiguity affects particular error types.

The time coverage of the archive used to mine pairs overlaps the years covered by the benchmark. The reported years alone leave the relationship between specific source pages and benchmark pages uncertain. The artificial targets come from a separate modern news corpus, and the learned generator acquires its error examples from the historical collection. The study gives no page-level analysis of that relationship from which to determine how the generator would perform on a fully independent historical archive.

The baseline accuracies give a useful account of the starting points for these OCR outputs. They cannot by themselves identify a general threshold for when correction pays off. The streams may produce different kinds of mistakes, and filtering leaves different sets of retained tokens. Two transcripts with similar starting word scores could still pose different problems if the errors they contain differ in recoverability. The results establish that the best settings improve OLD and FR11 and fail to improve Tesseract under these conditions. Predicting success in another corpus would require evidence about both the errors present and what the correction procedure changes.

Finally, some window settings finish close together, and the paper reports their scores without uncertainty estimates. The tables identify the strongest observed setting for each stream, while the recurring improvement over isolated words gives broader evidence for the benefit of some context within this study. The paper also leaves unmeasured the effects on the kinds of humanities analysis that motivated the work. Exact word accuracy can be reported directly for this benchmark. Whether a corrected or modernised text helps a particular research task depends on which of its changes bear on that task.

### What came after

[OCR-free Document Understanding Transformer](https://md.research.elamur.ai/free/en/papers/kim-2021-ocr-free-document-understanding-transformer/) (2021) cites the Finnish study. Its title identifies a related question at the level of the document processing pipeline. The Finnish paper starts with text that has already been produced by OCR and learns to repair central words in that text. The citing work's stated subject is document understanding without a separate OCR step. The citation therefore connects work on improving an existing transcription with work on processing documents without that intermediate stage.

The specific role of the Finnish study in the citing work is unclear. The citation establishes that the work was acknowledged, and the title establishes the difference in scope. There is no basis for attributing use of the Finnish study's synthetic error generator, morphological filter or Fraktur evaluation to the citing work. The demonstrated contribution remains the Finnish experiment itself, which tests how to learn word repairs from generated mistakes when digitised text is already available.

## Cite

Cite as Quan Duong, Mika Hämäläinen and Simon Hengchen. 2021. An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish. 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{duong2021unsupervised,
  title = {{An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish}},
  author = {Quan Duong, Mika Hämäläinen and Simon Hengchen},
  booktitle = {Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa)},
  year = {2021},
  doi = {10.5281/zenodo.4242889},
  url = {https://doi.org/10.5281/zenodo.4242889}
}
```

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