An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish
Paper · 2021 · Quan Duong, Mika Hämäläinen and Simon Hengchen
Summary
A word in a digitised Finnish newspaper can look unfamiliar for several reasons. The software that read the page may have mistaken a letter, the word may carry an inflection unfamiliar to a modern reader, or the newspaper may simply use an older spelling. This paper asks whether software can repair errors in optical character recognition, or OCR, without first being trained on hand-corrected pages. The authors start from a method that finds likely errors by comparing words in a historical newspaper collection. They adapt it to Finnish and use the resulting examples to learn how to introduce plausible errors into clean modern text. Because the original word is known, each such alteration automatically produces an example for training a corrector.
The paper compares errors generated at random with errors produced by a system trained on likely mistakes from the historical collection. A character-based Transformer learns to recover the clean word. It can read the damaged word on its own or with words on either side, while returning only the central word. The experiments distinguish what the system learns from the design of the benchmark. A reading such as lukuvuoden can be legitimate modern Finnish even when the historical reference expects lukuwuoden. To make the output more comparable with that reference, the authors test a further pass that retains the original OCR word when a Finnish analyser rejects the proposed correction, then converts v to w.
On the Finnish Fraktur benchmark, the direct outputs of the correctors fall below the original OCR on exact word matching. After the additional pass, the best settings improve on the OLD and FR11 OCR outputs by a reported 3.92 and 3.71 percentage points, respectively. Both gains come from the learned error generator paired with a window of 3 words. Tesseract starts at 88.29% word accuracy, and its best corrected result is 84.00%. The paper traces this decline to the number of initially correct words that the system changes. Each of the strongest results therefore depends on the balance between repairing wrong words and preserving right ones, as well as on whether the desired output is a historical transcription or a version in modern spelling.
Deep dive: An Unsupervised method for OCR Post-Correction and Spelling Normalisation for Finnish
How an unsupervised method learns to correct OCR errors in historical Finnish, and why modern spelling changes the way its results are scored. · about 32 minutes to read
The problem and its context
What counts as an error in a newspaper transcription
Optical character recognition turns the visible marks on a page into text. OCR post-correction begins after that conversion, with the text the recognition system has already produced. In the paper's experiments, the repair procedure receives words from that transcription. The procedure has access to spelling patterns and, in some settings, neighbouring words. The printed image supplies no direct evidence at this stage. A character proposed by the corrector is a prediction about the text, whereas the OCR engine has already made its own reading of the original page.
Historical Finnish makes that prediction unusually hard. Finnish has rich morphology, the system by which words are built and change form. A dictionary often records a base form, while a text contains inflected forms with endings that express grammatical information. An unfamiliar ending can therefore be evidence of a legitimate form. Historical texts add another source of variation because some older inflections have become uncommon or disappeared from modern usage. A spelling that looks unexpected to a tool built for contemporary Finnish can still be a faithful reading of a newspaper.
The distinction has practical consequences for collecting training examples. Consider a process that labels any form absent from a list of dictionary headwords as damaged. In a heavily inflected language, that procedure can put genuine words into the error collection. If the system then learns to change a valid inflected form into a nearby familiar form, a mistake made during data collection becomes an instruction to change good text. A method that recognises some of the relationships between word forms can avoid part of this problem. Its usefulness depends on how much of the historical language the linguistic resource can recognise.
Spelling introduces a second judgment. A transcription can preserve the spelling visible in the original publication, while a normalised version can present the same word in a form current readers and tools are more likely to recognise. In the paper's example, lukuwuoden and lukuvuoden illustrate this distinction. If a benchmark asks for the historical spelling, replacing the former with the latter registers as a change away from the reference. If the purpose is to produce modern Finnish, it may be precisely the change the reader wants. The paper investigates both with a method whose clean training words come from modern sources and whose benchmark retains historical spellings.
Why researchers cared about OCR quality
As national libraries and digitisation projects made large collections available, humanities researchers began to use them for analyses that would be difficult to carry out by reading pages individually. Such work may involve named entity recognition, which identifies mentions such as names in text, or topic modelling, which groups recurring patterns of word use into themes. The paper's review asks how confidently researchers can interpret such analyses when the words reaching these procedures contain recognition errors.
The authors describe a mixed record. Hill and Hengchen compared material from Eighteenth Century Collections Online with a keyed transcription of corresponding texts. They found that OCR noise appeared to have a limited effect on the quantitative analyses they examined. The paper places that observation alongside earlier studies of named entity recognition and authorship attribution that reached broadly similar conclusions in their settings. A study by Mutuvi and colleagues, in contrast, found consequences for topic modelling on historical newspapers. Work by van Strien and colleagues suggested that the impact could differ substantially from one downstream task to another.
Taken together, those studies make the intended use of the text important. An analysis based on patterns repeated throughout a collection may respond differently to noise from one that depends on matching a particular form. The earlier findings do not supply a common error level at which a collection becomes suitable or unsuitable for research. The paper frames OCR quality as a question for collection holders as well as researchers, drawing attention to institutional reports on digitisation and to investigations of OCR in newspaper collections. Its own experiments then focus on a narrower condition it can measure directly, whether a system emits the word expected by a reference transcription.
The authors also place Finnish alongside other languages for which historical books are valuable and language technology is relatively scarce. They mention Erzya, Sami and Komi as related languages for which historical resources remain to be digitised. Their review notes work on improving recognition for endangered languages by restricting the domain in which an OCR system learns and operates. That is a way to address the initial reading of the page. Post-correction addresses the separate situation in which the collection already has OCR output and the researcher wants to improve it.
How earlier correction methods obtained their evidence
The paper describes two broad ways to guide a correction. One is to build linguistic knowledge into the process directly. In earlier work on Finnish newspapers, Drobac and colleagues used weighted finite-state methods. Silfverberg and Rueter also applied finite-state methods to Finnish and Erzya. A finite-state tool can represent regular relationships among character strings, including relationships between a dictionary form and its inflected forms. The present paper retains this kind of resource for recognising words during data preparation and checking proposals after correction.
Another approach casts the task as machine translation within a language. The input is a noisy string, and the desired output is the corresponding clean string. The paper points to statistical translation in earlier work on historical text normalisation, followed by neural approaches to recognition errors. Dong and Smith operated on words in a sequence. The approach by Hämäläinen and Hengchen, which the Finnish paper extends, operated on characters. The authors also cite work that used BERT embeddings in an English OCR post-correction system.
Treating correction as translation clarifies the need for pairs. Each training example has to present a damaged form together with a target the system should produce. A supervised approach can make those examples by aligning OCR with hand-corrected text. That gives a direct source of evidence about what was printed, but assembling such a collection takes time. The problem is especially pronounced when there is enough digitised material to make automatic correction worthwhile but little corrected text from which to learn.
Hämäläinen and Hengchen's earlier method offered a way to obtain pairs automatically. Genuine words and their misreadings can occur in similar surroundings across a collection. Their strings can also be close enough for a small set of character edits to connect them. These clues allow a system to propose that an unfamiliar form is an erroneous rendering of a familiar one. The Finnish paper takes up this idea with two changes in mind. The list of recognisable words has to accommodate inflection, and the final corrector can use neighbouring words to help decide what an observed string was intended to say.
The paper treats clean contemporary text as another useful resource. A clean word can always serve as the known target of an artificially damaged example. Modern text thereby supplies the material for correction training, while noisy historical text supplies clues about the kinds of damage to simulate. The distinction matters because identifying the precise historical line for every modern word is unnecessary. It also means that the wording and spelling the corrector learns to produce come from a different period from the text it will be asked to repair.
The method, step by step
From a noisy archive to examples with known targets
The method has two routes to training examples. The first finds likely pairings inside a historical collection and trains the comparison system, NATAS. The second starts from clean news text, damages selected words, and teaches a corrector to recover the originals. The learned version of this second route borrows the archive pairings from the first. It reads them in reverse, learning to turn a probable correct form into a probable OCR error. The random version creates character edits without learning from the archive.
Both routes use character sequences. A spelling is represented as an ordered set of letters with markers to indicate boundaries. A corrector can then learn an edit that applies across many words rather than having to store a correction for each word as a unit. The paper illustrates the archive route with joleen paired with jokeen, an inflected form meaning “into a river.” As a training example for repair, the damaged spelling goes in and the inferred correct spelling comes out. As an example for a learned error generator, the same forms would occupy the opposite roles.
The proposed route can put clean neighbouring words around the damaged training word. The same window at evaluation time is taken from OCR text. The decoder produces a spelling only for the word in the middle. A filter can then check the predicted word and adjust its spelling toward a historical convention before it is compared with the benchmark.
From archive errors to Finnish word correction
The steps in order.
Finding likely errors in historical Finnish
The authors train Word2Vec on the Historical Newspaper of Finland, which covers 1771 to 1929. Word2Vec uses patterns of occurrence to build word embeddings, numerical representations that make it possible to retrieve words appearing in similar contexts. They use Gensim for this step. If a genuine word appears correctly in some passages and is misread in others, both spellings can accumulate similar contextual evidence. Conversely, two different words can also occur in similar contexts. The embedding supplies a way to find candidates whose spellings and lexical status still need to be checked. Efficient Estimation of Word Representations in Vector Space
To make a list of accepted Finnish forms, the authors apply Omorfi, a Finnish finite-state morphological analyser available through UralicNLP, to the Word2Vec vocabulary. The analyser supports lemmatisation, the process of relating an inflected word to its dictionary form, called its lemma. They compare the resulting lemmas with a list from Finnish Wiktionary. When the lemma is listed, the corresponding vocabulary word goes into the collection of recognised forms. The entries used in word pairs can thus retain the original inflection.
This step changes what it means for a candidate to be unfamiliar. Under a direct headword lookup, a regular inflection can fail simply because dictionaries collect its forms under a single entry. With analysis before lookup, different inflected spellings can be recognised through a shared lemma. That adds a constraint to pair extraction. It still leaves room for valid forms that the analyser or list does not cover, as well as for OCR errors that happen to spell a recognisable word.
For each accepted word, the authors retrieve close neighbours in the embedding space and divide them according to whether they appear in the recognised list. The unfamiliar neighbours are candidates for OCR errors. The authors then apply Levenshtein distance, which counts the smallest number of character insertions, deletions and substitutions needed to make one string match another. The cutoff is 4. A candidate can be close in context yet fail this spelling check, and a candidate close by both measures can still be paired with the wrong word.
The resulting groups of likely correct spellings and likely errors supply pairs, with an error as input and a recognised form as target. NATAS trains on those fixed pairs using OpenNMT. The authors use its default configuration for this experiment, a bidirectional long short-term memory network, or LSTM, with global attention. The recurrent component processes a sequence while maintaining a state, and bidirectional processing reads it from both ends. Global attention gives the decoder access to information from across the encoded input as it predicts the output characters. Training runs for 10,000 steps, and the final checkpoint supplies the NATAS results. Effective Approaches to Attention-based Neural Machine Translation
This comparison is already adapted to Finnish. It analyzes word forms as it extracts data and trains a corrector on Finnish pairs. Its weakness is the reliability and reach of those pairs. Contextual resemblance and edit distance can make an erroneous string look like a variant of more than one word. Word2Vec also learns from a vocabulary subject to a frequency cutoff, so it cannot supply arbitrary variants of every spelling. Both issues motivate a procedure that starts with a known clean word and creates the damage deliberately.
Generating mistakes from clean news
The source of clean words is the Yle News corpus, which contains more than 700 thousand Finnish articles from 2011 to 2018. Before tokenisation, the authors remove punctuation and characters outside the Finnish alphabet. Tokenisation here determines the words that can become training targets and the neighbours that can become context. The source text supplies the known form even when the corruption changes its length or produces an unfamiliar string.
The random generator considers deletion, addition and replacement. For each operation, it draws a random value between 0 and 1 and checks whether it falls below the noise rate multiplied by the length of the word. The process uses a noise rate of 0.07. If the check passes, the generator picks a character position at random. It performs the edit when that position holds a member of its alphabet, abcdefghijklmnopqrstuvwxyzäåö. The alphabet also supplies letters for insertions and substitutions.
The rate controls the chance to attempt each kind of edit through the length of the word. It should therefore be read as a parameter of the generator, rather than as a measured share of characters changed in the output or in the historical archive. A word can undergo several kinds of edit because the generator considers them separately. It can also pass through unchanged. The authors give a word of 15 characters as an example where the length-scaled threshold always proposes an edit when the probability check is made at that length. Shorter strings have fewer chances to reach that condition.
This design represents plausible physical outcomes of OCR in a broad sense. A mark might be skipped, an unwanted letter introduced, or one letter read as another. The random generator gives these types of damage a simple implementation. In particular, it has no learned preference for the kinds of substitutions that might result from the shape of an old typeface. Its role in the study is to provide a comparison in which artificial examples are easy to produce and their clean targets are known, while the detailed choice of error lacks evidence from actual OCR.
Learning the shape of OCR mistakes
The trained generator starts from the archive pairs used by NATAS. By taking the recognised word as input and the probable OCR variant as its target, it tries to learn a transformation in the direction of corruption. The authors motivate this with the observation that i and l are more plausible confusions than i and g. A system trained on likely OCR pairs has a way to reflect such regularities without requiring a hand-built inventory of substitutions.
Simply reversing the pairs presented a problem. With the default cross-entropy objective in OpenNMT, the authors observed that the generator eventually copied its input. A damaged word and its source spelling can share most of their characters, so much of the training signal rewards producing the same letters. Copying defeats the purpose of the learned generator when the intended example should contain a plausible error. The authors therefore build a separate recurrent encoder and decoder and modify the training loss to discourage reproducing the clean input.
They first give the following cross-entropy expression.
cross_entropy(H, T) = −(1/n) ∑ᵢ₌₁ⁿ [t⁽ⁱ⁾ ln h⁽ⁱ⁾ + (1 − t⁽ⁱ⁾) ln(1 − h⁽ⁱ⁾)]
Here H is the collection of predictions and T the collection of corresponding targets. The index i identifies a prediction–target pair, and n is the number of pairs in the expression. The terms h⁽ⁱ⁾ and t⁽ⁱ⁾ are the prediction and target for entry i. The symbol ∑ adds the bracketed expression over the full index range, from 1 through n, and 1/n takes its average. The function ln denotes the natural logarithm. The expressions involving 1 − refer to the complementary values for the prediction and target. The plus sign combines the terms inside the brackets, and the leading minus sign makes the average a loss to minimise. The compact form shows how the score rewards assigning probability to the target.
The generation objective uses that expression in both terms, with the clean input entering the second one.
loss = cross_entropy(Ŷ, Y) + 1 ÷ cross_entropy(Ŷ, X)
The variable Ŷ denotes the generator's prediction, Y the desired erroneous form from an archive pair, and X the clean spelling used as input. The first cross-entropy scores the prediction against the error the system is meant to imitate. The second scores it against the clean input. The symbol ÷ forms a reciprocal by dividing 1 by the latter score, and + adds that term to the first loss. A prediction close to the clean input can make the second cross-entropy small, causing its reciprocal to grow. Minimising the combined loss thus puts pressure on the generator to resemble plausible errors from the training pairs while moving away from a pure copy.
This objective gives a reason to make a change and a source of evidence about what kind of change to make. It does not itself specify that a particular pair is a reliable record of what happened on a page. The target examples remain the likely errors obtained through the archive procedure. Applying the trained generator to clean news words means that the source of a newly generated mistake is known, even if the archive pairs that shaped the generator were individually uncertain.
The generator's encoder and decoder each use an embedding layer with 128 dimensions and a gated recurrent unit, or GRU, with 512 hidden units. The embedding represents each character for the recurrent computation. The encoder turns the input string into a context representation. At each decoding step, the decoder brings together that source representation, its hidden state and the embedding of an input character. A linear layer uses the merged information to produce the next prediction.
During training the authors use teacher forcing at a rate of 0.5. Teacher forcing means that the decoder can receive a character from the known target sequence as it moves to its next prediction. In the alternative, it uses its own previous leading prediction. Supplying the known character gives it practice continuing from the desired error sequence. Feeding back its own choice gives it practice continuing from a sequence it has started to generate. This training belongs to the system that creates OCR-like mistakes. The final corrector learns in the reverse direction, from a generated error back to the clean news spelling.
Teaching the corrector to use nearby words
For the proposed correctors, the authors use a Transformer implemented in PyTorch. Attention lets each position use information from other positions in the sequence. Multiple attention heads give a layer several ways to combine that information, while learned positional encodings represent the order of characters and markers. The paper motivates the architecture in part by the cost of processing a sequence recurrently and partly by the ability of attention to use information across the input.
The corrector has 3 encoder layers and 3 decoder layers, with 8 heads of self-attention per layer. Training uses ordinary cross-entropy for predicting the clean output. The authors use Adam with a fixed learning rate of 5 · 10⁻⁴. They report better convergence with this setting than with the default value of 0.001 in their experiments. The unusual reciprocal term from the trained generator serves a specific purpose in corruption and is not part of the correction objective.
A window defines the word to correct and how much text the system can read around it. The middle word is the target. The other words are visible input, and the output contains only a proposal for the centre. The window has an odd size so that the target has the same number of positions available to its left and right. A size of 1 presents the word on its own. Sizes of 3 and 5 supply increasingly broad local context.
The paper illustrates the encoding with the English placeholder target, corrupted to farget. The character sequence for farget sits between two <ctx> markers when the input includes neighbouring words. These markers identify the start and end of the central word relative to the context. A <sep> marker separates adjacent context words on a side. The symbols <sos> and <eos> mark the beginning and end of a sequence. When inputs in a training batch need to be brought to a common length, <pad> supplies padding. The target sequence starts with <sos>, spells target as individual characters and ends with <eos>. With the window of 1, the corrupted word needs only the sequence boundary markers.
The markers tell the network how to read a sequence in which ordinary spacing has been replaced by a character representation. In a longer window the neighbouring words can supply clues to the central word's identity or inflection. Keeping those words outside the output allows the same exact-word scoring procedure for every setting. It also means a correction to one word is a separate prediction from a correction to its neighbour, even when that neighbour appeared in its context.
Unlike the baseline's fixed collection, the artificial examples are built during training. The data loader generates erroneous words for each mini-batch, giving the corrector opportunities to encounter more variants. The clean source still supplies the target. The distinction between fixed archive pairs and renewed artificial examples is part of the experimental treatment, alongside where the text comes from and the architecture used for correction.
The authors use a batch size of 256 and train each combination of corruption method and window size until its loss converges. The label Rand identifies training with random corruption, and Train identifies training with the learned generator. W1, W3 and W5 identify the word window. Thus TFTrainW3 uses learned corruption and a window of 3 words. The runs converge after around 20 epochs. The paper gives approximate training losses of ∼ 0.064 for the learned-corruption variants and ∼ 0.059 for the random-corruption variants. Those losses describe the training task under each corruption process. The evaluation separately tests which training conditions transfer to actual historical OCR. The authors make the source code and trained systems available through GitHub and Zenodo.
Experiments and results
The benchmark and the comparison with untouched OCR
The Ground Truth Finnish Fraktur dataset from the National Library of Finland contains 479 pages from historical newspapers and journals spanning 1836 - 1918. Its aligned data comprise 471,903 rows of words or characters. For the comparison in the paper, the relevant fields are a reference transcription and the readings produced by Tesseract, OLD and FR11. The authors evaluate each OCR output separately. Each receives the same types of correction, but each starts from its own set of readings and its own level of word accuracy.
Training used alphabetic text, so the authors exclude evaluation tokens containing non-alphabetic characters. They also remove blank rows with no OCR result. This leaves 458,799 tokens for Tesseract, 464,543 for OLD and 470,905 for FR11. On those retained tokens, the uncorrected word accuracies are 88.29% for Tesseract, 75.34% for OLD and 79.79% for FR11. The figures describe exact matching to the historical reference after the stated exclusions. The differences in token counts matter because the three scores apply to the retained material for each OCR output.
Exact word accuracy gives credit when the entire returned word matches the reference. An output can repair a character and still fail if another character remains wrong. A spelling change that is appropriate in modern Finnish also fails when every other character is right but the reference retains an older convention. The authors choose word-level evaluation in preference to character-level scoring and note the difficulty posed by long Finnish words. A long word offers more opportunity for at least part of it to remain different from the reference.
NATAS uses OpenNMT's default translation settings for evaluation. The Transformer variants consume either single tokens or windows made by sliding over rows of OCR text. They use beam search with k = 3. In this setting, k is the width of the search, which considers competing partial output sequences as it predicts the word. The highest-probability resulting sequence supplies the correction. The neighbours in this evaluation are observed OCR words, whereas the training example draws its context from clean news. The system therefore has to work even when the words it could use to resolve an ambiguity contain mistakes of their own.
Direct correction and the historical reference
The first comparison scores the output immediately after decoding. NATAS reaches 63.35% on Tesseract, 61.63% on OLD and 64.95% on FR11. The proposed correctors improve on NATAS across these settings, but their direct outputs still score below the corresponding uncorrected OCR. For instance, TFTrainW5 yields 71.24% word accuracy on Tesseract, 69.30% on OLD and 73.21% on FR11. The random-corruption version with the same window, TFRandW5, also reaches 71.24% on Tesseract and gives 68.35% on OLD and 72.56% on FR11.
The comparison with NATAS answers whether the new training strategy produces stronger direct predictions than the archive-based system used as the baseline. The comparison with uncorrected OCR answers whether applying these predictions yields a better transcription for this reference. Those comparisons can point in different directions. A corrector can make better suggestions than NATAS yet still rewrite too many words that already match the historical ground truth.
The authors inspect the disagreements and identify two recurring reasons to reconsider a direct prediction. Some outputs reflect modern spelling, as with lukuvuoden where the reference uses lukuwuoden. Other outputs appear to invent a word. The paper gives samppaajaa as a proposed form where samppanjaa, meaning “of Champagne,” is likely intended. The first example poses a problem of choosing a spelling standard. The second raises the question of whether an apparently plausible character sequence is a Finnish word at all.
Their additional pass first applies Omorfi through UralicNLP to the proposal. If the analyser does not recognise the word, the procedure retains the original OCR reading. It then replaces v with w in words containing v. This second operation is a broad attempt to bring predictions closer to the period spelling in the reference. The paper motivates it with earlier work by Kettunen and Pääkkönen. In that investigation, words with w made up 3.3% of tokens, and the morphological analyser FINTWOL failed to recognise 97.5% of those words. When the researchers changed w to v, the unrecognised share of that group fell to 30.6%. The earlier replacement went in the direction of modern spelling for analysis. The present evaluation uses the reverse direction to approximate historical spelling.
Results after the lexical and spelling pass
The paper reports all-word accuracy after both operations and then breaks it down by the status of the original OCR word. “Error words accuracy” is the share of originally wrong words that the final output gets right. “Correct words accuracy” is the share of originally right words that the final output leaves matching the reference. The untouched OCR and the output of a complete correction pipeline can be compared on overall accuracy. The separate scores help explain why the overall comparison turns out as it does.
For Tesseract, the final outputs of the proposed systems improve substantially on their own direct scores. The top setting, TFTrainW5, reaches 84.00%, below the untouched OCR at 88.29%. This setting repairs 18.02% of the originally erroneous words and keeps 92.75% of the originally correct words in agreement with the reference. The authors report that 7.25% of the initially correct words are changed away from the reference. Because correct words are much more common in Tesseract's starting text, that loss outweighs the repairs. The learned generator with the window of 3 repairs 18.15% of existing errors, the highest figure in that group, but its lower preservation score leaves its overall result at 83.96%.
Tesseract word accuracy on Finnish Fraktur after post-processing
The best correction setting improves on NATAS while untouched OCR keeps the highest word accuracy.
The numbers
| System or setting | Word accuracy % |
|---|---|
| Untouched Tesseract OCR | 88.29 |
| NATAS | 74.71 |
| Random corruption, window of 5 | 81.89 |
| Learned corruption, window of 3 | 83.96 |
| Learned corruption, window of 5 (this paper) | 84.00 |
On OLD, the paper reports that 5 out of 7 correction settings exceed the untouched OCR. TFTrainW3 gives the highest word accuracy at 79.26%, an improvement of 3.92 percentage points over the initial 75.34%. It repairs 36.03% of the originally wrong readings and preserves 93.41% of those that were right. TFTrainW5 keeps slightly more correct words in agreement with the reference, at 93.50%, and repairs a smaller share of the errors, at 35.41%. Its overall word accuracy is 79.17%. NATAS reaches 71.19% after the same extra pass, below the initial OCR.
OLD word accuracy on Finnish Fraktur after post-processing
Learned corruption with the middle window gives the highest accuracy and improves on the original OCR.
The numbers
| System or setting | Word accuracy % |
|---|---|
| Untouched OLD OCR | 75.34 |
| NATAS | 71.19 |
| Random corruption, window of 5 | 76.26 |
| Learned corruption, window of 3 (this paper) | 79.26 |
| Learned corruption, window of 5 | 79.17 |
For FR11, 5 out of 7 settings again improve on the original reading. The starting accuracy is 79.79%, and TFTrainW3 reaches 83.50%. The reported gain is 3.71 percentage points. The same setting repairs 45.17% of the words that were initially wrong and preserves 93.21% of those that already matched the reference. TFTrainW5 again has the higher preservation score at 93.30%. Its recovery rate on initially wrong words is 44.01%, and its overall accuracy is 83.34%. NATAS, after the extra pass, reaches 75.06%.
FR11 word accuracy on Finnish Fraktur after post-processing
The learned corruption settings shown improve on the original OCR, with the middle window scoring highest.
The numbers
| System or setting | Word accuracy % |
|---|---|
| Untouched FR11 OCR | 79.79 |
| NATAS | 75.06 |
| Random corruption, window of 5 | 81.09 |
| Learned corruption, window of 3 (this paper) | 83.50 |
| Learned corruption, window of 5 | 83.34 |
The best pipeline depends on the OCR output to which it is applied. FR11 has the strongest observed recovery of originally wrong words in the reported comparisons. OLD has a slightly larger reported improvement in overall accuracy. Tesseract sees some genuine repairs, but its relatively clean starting text leaves little room for changes to help. These results describe a correction and filtering procedure evaluated against historical spellings. The paper's examples show that its direct outputs can modernise spellings, but the word-accuracy scores after converting v to w measure a different objective.
What the ablations show
Random errors and learned errors
The cleanest comparisons are among the Transformer settings, where the authors vary the source of artificial errors or the amount of nearby text. At a fixed window size, the correctors use the same broad architecture and the same source of clean words. The generator is the part that changes. This makes it possible to ask whether artificial training examples benefit from the patterns learned from real OCR, over and above the benefit of having a known clean answer for every example.
On direct outputs, learned corruption generally improves word accuracy at a given window size. The comparison at the largest window ties on Tesseract, where TFRandW5 and TFTrainW5 both give 71.24%. After the lexical and spelling pass, the learned generator has higher overall accuracy at each matching window size across all three OCR outputs. At the window of 3 on FR11, for instance, overall accuracy is 80.06% for random corruption and 83.50% for learned corruption. The share of initially wrong words recovered is 37.00% and 45.17%, respectively. This comparison connects the overall advantage to a stronger ability to repair error words in that setting.
The score on already-correct words adds to the interpretation. At the same FR11 window, the random-corruption setting preserves 90.96% of initially correct words, and learned corruption preserves 93.21%. Here the learned training errors help on both sides of the decision, recognising damage and leaving correct words in agreement with the reference. The comparison supports using archive-derived information to shape training examples. It does not separate that information from the learned generator's other properties, such as its objective and the number or kind of edits it introduces. A controlled comparison between established OCR confusions and a random generator matched for the extent of corruption would require further evidence.
The training loss gives an instructive contrast with the historical evaluation. The random-corruption variants reach the lower reported training loss, even though their word accuracy is generally lower on the historical benchmark. The targets and corruptions encountered in training determine what that loss measures. An easier artificial reconstruction task can have a lower loss while teaching less about the damage present in an actual OCR stream. The experiment gives a concrete example of why convergence on generated data and successful correction of historical data are separate observations.
What context contributes
The smallest window is an isolated spelling task. A prediction can use the characters in the damaged word and regularities learned from training. With a wider window, the corrector can also condition its proposal on nearby words. This is potentially useful when the central string has more than one plausible reading or when the intended inflected form is easier to recognise in a phrase. The paper measures whether adding such information produces more exact matches overall, without assigning individual successes to particular grammatical or lexical clues.
For both generators and all OCR outputs, the window of 1 gives lower overall accuracy than the corresponding wider windows. The random-corruption systems continue to improve in overall accuracy as the window grows across the sizes tested. On OLD after the extra pass, their series is 75.10%, 75.40% and 76.26%. The result supports giving the corrector access to local context even when training errors are made through a simple random process.
With the learned generator, the overall post-processed results on OLD and FR11 peak at the window of 3. Expanding to 5 preserves a slightly larger share of already-correct words while yielding a smaller share of repairs on initially wrong ones. On Tesseract, the corresponding move lifts overall accuracy from 83.96% to 84.00%, with the larger window again preserving more correct words and the smaller one recovering more errors. The paper's broader conclusion that context helps is strongest when comparing a word alone with a word in a window. The choice among nontrivial window sizes depends on the OCR stream and the balance of repair and preservation.
Those comparisons also show what the context experiment cannot localise. Providing more neighbouring characters expands the information available to the corrector, and it changes the sequence length and amount of potential noise it sees at evaluation time. The paper measures the result of changing the window as a package. There is no separate experiment for the accuracy of the neighbouring words or for the importance of a particular side of the target. The higher preservation scores therefore describe the behaviour observed with a wider window, without identifying which contextual clue caused a particular decision.
What the baseline and the added pass isolate
NATAS provides a realistic comparison with a Finnish adaptation of the earlier English method. It uses automatically extracted, fixed archive pairs and a recurrent corrector. In the proposed pipeline, the training targets come from modern news, the inputs are artificially corrupted, the examples can be renewed during training, and the corrector uses a Transformer. Context is available in some settings. The margin over NATAS establishes that the new package works better on the paper's comparisons. It cannot assign a share of that advantage to architecture, dynamic data generation or the standard of spelling alone.
The scores before and after the lexical and spelling pass measure another bundled change. The applied procedure can reject an implausible prediction and it can change the spelling of a retained form toward the reference. Both actions can raise exact-match accuracy, and their effects can interact. The paper does not report separate benchmark runs for lexical filtering alone and historical spelling conversion alone. It gives examples that explain why each mechanism can matter, with the combined scores showing how much the resulting pipeline helps under the historical evaluation.
The split between originally wrong and correct words is particularly informative because an overall score can conceal strong performance for one group and costly mistakes for the other. Tesseract illustrates the consequence. The best setting repairs some errors and still makes the whole transcription less accurate. FR11 and OLD show cases where enough repairs survive to improve the overall score. Evaluating these groups separately makes it possible to see the tradeoff even when the difference between adjacent window sizes is small.
Limitations
Limits identified by the authors
The paper identifies the Tesseract result as a case for further work. The method changes too many successful original readings compared with the number of errors it repairs in this stream. The recovery score establishes that the corrector can help on some words. The overall score shows the cost of applying its proposals across text that starts at relatively high accuracy. The experiment evaluates this tradeoff at the reported settings. It leaves open how to identify more precisely when a correction should be trusted.
The authors also point out that a morphological analyser cannot certify every valid string in an OCR collection. Their example concerns mcntoistamuotiscn, for which the corrector recovers the character sequence expected by the reference. The relevant reference token is a fragment of kolmetoistavuotisen, meaning “13 years old.” A line break has separated the initial kol from the rest in the data. Omorfi rejects the recovered fragment as a Finnish word, so the pipeline falls back to the OCR reading even though the prediction agreed with the benchmark before filtering.
This is a mismatch between two reasonable standards. A morphological analyser is asked whether the proposal is a word form it can recognise. The reference can contain the portion of a word that occupies a particular position in an aligned transcription. A fragment can therefore be correct as a transcription and unrecognisable as a standalone word. The example demonstrates the authors' point that validity checks need to account for the features of OCR material, where layout and token boundaries can affect what is presented for correction.
The authors acknowledge that replacing v with w is a rough way to align outputs with older spellings. The substitution addresses a prominent pattern in the benchmark, but its use does not guarantee that the resulting spelling is correct. Some predictions have already been usefully normalised to contemporary Finnish. The authors note that a historical exact-match evaluation can miss those successes, and they suggest that better checks of word validity could also recover good proposals discarded by the current filter. Their examples show both why the added pass improves the reported evaluation and why the pass can lose desirable output.
The approach also has resource requirements. Training can proceed without a large set of OCR pages aligned to hand corrections, but it uses noisy OCR text, a word list, a morphological finite-state analyser and a source of clean text. The authors mention dictionaries, finite-state tools and Universal Dependencies treebanks for related Uralic languages as reasons to explore transfer. Komi-Zyrian, Erzya, Komi-Permyak and North Sami feature in their discussion of existing resources. The experiments in the paper concern Finnish. The authors describe using the procedure in other language settings as future work. Universal Dependencies v1
Limits that follow from the experimental setup
The evaluation does not provide a complete measurement of spelling normalisation. The supervised evidence used for scoring is a historical transcription, and the method learns its output spelling from modern news. The examples establish that some disagreements are defensible modern forms. A separate accuracy figure for normalisation would require judgments about which contemporary forms are acceptable, applied consistently to the historical inputs. The added conversion toward w helps compare output against the available historical reference and leaves the quality of a fully modernised version unquantified.
The scope of the benchmark is also narrower than complete page restoration. Non-alphabetic tokens and blank OCR rows are filtered out. The correction unit is a word drawn from the retained sequence, and the system outputs one central word at a time. The reported word accuracies do not cover restoring missing passages, repairing the reading order of a page, or handling punctuation and other excluded characters. The line-break example shows that page structure can affect even an alphabetic token that survives the filtering.
There is uncertainty in the pairs used to train the learned generator. The archive procedure recognises plausible inflections and tests contextual and spelling resemblance. Those tests make mining feasible, but no corresponding page image or manual correction establishes the relationship for every pair. The method can learn regularities from a collection that contains mistaken pairings. Its benchmark advantage over random corruption provides some evidence that useful information survives this noise. It does not determine how often the archive pairing is correct or which kinds of pairing errors are most consequential.
It also remains difficult to predict where the method will help based only on starting OCR accuracy. The reported comparison contains a system with a high baseline for which post-correction is harmful and two other systems for which the best configuration is helpful. Each OCR output may supply different errors, while the filtering yields a different retained token set. The ability to fix a mistake depends on what that mistake looks like and what evidence is available in its context. The study shows outcomes for these particular streams, without establishing a general starting-accuracy threshold below which post-correction helps.
The results are point estimates for the evaluated material. The paper gives close scores for some settings and does not supply uncertainty estimates for those differences. It is possible to say which window has the highest reported score on each OCR output. A claim that the same ordering would hold across other newspaper collections, periods or OCR systems would require further evaluation. The evidence for adding some local context is broader within the experiment because it recurs across the reported generator and OCR combinations.
Finally, the earlier studies of downstream text analysis supply motivation, and the current paper measures agreement with a reference at the word level. It does not run a downstream task on the corrected Finnish newspapers. A gain in exact word accuracy does not establish the effect on a particular search, name-recognition procedure or quantitative study. The utility of a modernised spelling and the utility of a historically faithful spelling can also differ by task. The paper's findings are most directly applicable to the production and evaluation of word-level corrections under the conditions it tested.
What came after
OCR-free Document Understanding Transformer (2021) cites the Finnish study. Its title places it at a different point in document processing. The Finnish study begins with the transcript from an OCR system and asks how far automatically generated training data can improve it. The citing work addresses document understanding without a separate OCR step. The citation connects research on repairing the text delivered by OCR with research on document understanding that can proceed without such an intermediate result.
The citation establishes that connection, but leaves the specific use of the Finnish method unclear. It does not establish that the citing work adopted the learned error generator, used the Finnish Fraktur benchmark, or evaluated historical spelling normalisation. Those are distinct contributions of the Finnish paper, whose evidence concerns how to create training pairs and measure repairs when a collection already comes with OCR text.
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).
@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}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/duong-2021-unsupervised-method-ocr-post-correction/