Handwritten Text Recognition at the National Library of Norway

by Yngvil Beyer, National Library of Norway

Share this article

Digitisation, in the form of digital images, of large collections of manuscripts and letters offers the opportunity to convert such sources into machine readable text formats, and hence make them available for full text search.

In 2006, the National Library of Norway started an ambitious project: making all printed material available for full-text search through extended use of OCR (optical character recognition). Per April this year, 563,744 books, 3,240,856 newspapers and 75,686 journals are available from our website. Handwritten documents, however, have until now only been digitised as facsimiles. As we all know, handwritten documents are much more varied in layout, as well as writing style and spelling, and OCR has not been possible to use.

At the National Library of Norway, the collection of handwritten manuscripts and letters counts hundreds of thousands of items. At present, close to 26,000 of these items are digitised and made available at the library’s website. Until recently, these items have only been accessible as digital images through metadata search, and readable by humans on screen.

CERL Blog - Handwritten Text Recognition at the National Library of Norway - List of available incunabula

New technological developments for both layout analysis and text recognition have triggered an ambition at the National Library, as well as in many other LAM institutions, to make digitized objects searchable and readable in full text. The EU financed project Transkribus has taken a lead in the development of this technology, and is widely used within the field.

In 2020, we started a pilot project aiming at creating models for automated handwriting recognition and integration of transcription data in the digital library.

Model building

We started out training data models for a small number of specific writers. To get a satisfactory result, the CER (Character Error Rate) should be less than 4% in order to do keyword search, and even less in order to use the transcriptions as reading sources.

We have now trained specific models for approximately 10 writers. The aggregation of these models has resulted in the NorHand model, a general model for Norwegian hand writing between 1850 and 1940.  NorHand can be used for recognition as is, or we can use it as a base model when training new specific models.

The table shows some of the results for our models. We usually use 90% of our ground truth data as training data, and the last 10% are used for validation.

CER training CER validation No of words
Sigrid Undset 2.04% 3,27% 113 914
Henrik Ibsen 0,60% 1,50% 87 843
Kristine Bonnevie 0,34% 2,97% 33 274
NorHand 3,38% 3,04% 373 135

The error rate chart below shows the results from a test with NorHand on a letter, from a writer that was not part of the training data [1]. As we can see, the CER is around 7% for this letter, or 22% WER, which means that every fifth word has one or more errors. An excerpt of the automatic transcription and the corrected transcription are shown below.

CERL Blog - Handwritten Text Recognition at the National Library of Norway - Error rate chart

Automatic transcription with NorHand:

CERL Blog - Handwritten Text Recognition at the National Library of Norway - Automatic transcription with NorHand

Corrected transcription:

CERL Blog - Handwritten Text Recognition at the National Library of Norway - Corrected transcription

Integration with our web search

In order to make manuscripts part of the library’s federated full-text search, we use the ALTO-XML format from Transkribus. This XML contains positional information for each word in the transcription, as seen in the example below.

CERL Blog - Handwritten Text Recognition at the National Library of Norway - Alto XML

A search for the word “dear” in letters written by Willa Cather, an American writer and friend of Sigrid Undset.

CERL Blog - Handwritten Text Recognition at the National Library of Norway - Flere treff - more hits

https://www.nb.no/search?q=dear&mediatype=brev-og-manuskripter&name=%22Cather%2C%20Willa%22

Clicking on “Flere treff” (more hits) below a letter, we can read the context of the word in the search.

CERL Blog - Handwritten Text Recognition at the National Library of Norway - Flere treff - more hits

Selecting one letter, you can read the context for the search word(s), or make a new search within the letter.

CERL Blog - Handwritten Text Recognition at the National Library of Norway - searching one letter

At the National Library we are now using Transkribus as a means for making source material available for forthcoming anniversaries and so on. We already observe that this way of making the material available is very useful for both researchers and others interested in the writings of the past.

Updated information about the project can be found here.

  1. Test letter: Brevs. 174 Brev fra Larsen, Anton Laurentius Finckenhagen (1827-1888) til Aasen, Ivar (1813-1896), dated 1870 (https://www.nb.no/items/7ae6457b76c7fb23d1016962cd7ca5f6) WER: Word Error Rate, CER: Character Error Rate.
CERL Blog - Handwritten Text Recognition at the National Library of Norway - National Library Oslo

Related articles

Leave A Comment