DiEm_HTR / README.md
JoenRommedahl's picture
Update README.md
00d8497 verified
---
# For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
# Doc / guide: https://huggingface.co/docs/hub/datasets-cards
language:
- da
license: cc-by-4.0
size_categories:
- 10K<n<100K
task_categories:
- image-to-text
pretty_name: DiEm HTR - danish clerical handwriting from the 17th and 18th century.
tags:
- OCR
- HTR
- handwriting
- historical
dataset_info:
features:
- name: image
dtype: image
- name: doc_id
dtype: int64
- name: sequence
dtype: int16
- name: alto
dtype: string
- name: page
dtype: string
---
# Dataset Card for DiEm HTR
<!-- Provide a quick summary of the dataset. -->
The *DiEm HTR* dataset is a ground truth dataset for historical danish handwriting in the 17th and 18th century, generated as part of the *Digitalisering af Enesteministerialbøger* project at the Danish National Archives.
## Dataset Details
### Dataset Description
<!-- Provide a longer summary of what this dataset is. -->
The *Digitalisering af Enesteministerialbøger* project (DiEm) at the Danish National Archives aims to transcribe and make publically available all of the danish parish registers from before the 1813-reform by using the Handwritten Text Recognition (HTR) platform Transkribus. To this end, ground truth training data for the HTR-models have been created, which we now make publically available through Hugging Face.
The *DiEm HTR* dataset consists of 975 transcribed images, containing a total of 67410 text lines and 383339 words.
The following parish registers are part of the dataset:
| doc_id | parish_name | period | events | transcribed | notes |
|---|---|---|---|---|---|
| 8010610941-6469506 | Jersie Sogn | 1747-1814 | Contains: Births and baptisms, Confirmations, Marriages, Burials. | Volunteers have manually transcribed the book. | |
| 8010629211-6471563 | Solrød Sogn | 1752-1814 | Contains: Births and baptisms, Confirmations, Marriages, Burials. | Volunteers have manually transcribed the book. | |
| 8010634501-6472194 | Ølsemagle Sogn | 1732-1766 | Contains: Births and baptisms, Marriages, Burials. | Volunteers have manually transcribed the book. | Only the first 41 pages of the book is made Ground Truth, which are the available pages in the dataset.
| 0834247701 | Ål Sogn | 1691-1726 | Contains: Births and baptisms, Marriages, Burials. | Volunteers have manually transcribed the book. | The pictures of the book are not the ones that are available on The Danish National Archives, because the DiEm-project took its own pictures. |
| 8010720391-6482219 | Bråby Sogn | 1645-1749 | Contains: Births and baptisms, Marriages, Burials. | Volunteers have manually transcribed the book. | Not all pages from the book could be made Ground Truth. Only the Ground Truth pages are available in this dataset. |
| 8010785121-6490574 | Vester Ulslev Sogn | 1722-1801 | Contains: Births and baptisms, Confirmations, Marriages, Burials. | Volunteers have manually transcribed the book. | Not all pages from the book could be made Ground Truth. Only the Ground Truth pages are available in this dataset. |
| 8026583501-9436330 | Branderup Sogn | 1667-1814 | Contains: Births and baptisms, Confirmations, Marriages, Burials. | Volunteers have manually transcribed the book. | We only made the pages up to and including 1711 Ground Truth from this book. Only the Ground Truth pages are available in this dataset. |
| 8027899071 | Jels Sogn | 1648-1721 | Contains: Births and baptisms, Confirmations, Marriages, Burials. | Volunteers have manually transcribed the book.
| 8033700071-12391767 | Vinding Sogn (Vejle Amt) | 1651-1749 | Contains: Births and baptisms, Marriages, Burials | Volunteers have manually transcribed the book. | We only made parts of this book Ground Truth because of its bad condition and layout. Pages from 1657 up to and including 1735 is Ground Truth from this book. Only the Ground Truth pages are available in this dataset. |
| 8010560601-22053014 | Værløse og Farum Sogne | 1781-1814 | Contains: Confirmations. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
| 8034392541-22064545 | Tranekær Sogn | 1812-1818 | Contains: Communion og Confirmations. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
| 8034325781-12671556 | Ellested og Gislev Sogne | 1675-1687 | Contains: Births and baptisms, Marriages, Burials. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
| 8034365901-12691596 | Nyborg Sogn | 1665-1700 | Contains: Burials. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
| 8031903941 | Hvidbjerg Vesten Å Sogn | 1658-1704 | Contains: Births and baptisms. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
| 8010717631 | Alsted Sogn (Sorø Amt) | 1804-1814 | Contains: Births and baptisms, Confirmations, Marriages, Burials. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
| 8034383771 | Føvling (Ribe Amt) og Holsted Sogne | 1758-1772 | Contains: Births and baptisms, Burials. | An early version of the DiEm-project’s text recognition model in Transkribus recognised the book. |
- **Curated by:** [Markus Schunck](masc@rigsarkivet.dk)
- **Funded by:** Augustinus Fonden
- **Language(s) (NLP):** Danish
- **License:** [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/)
## Uses
<!-- Address questions around how the dataset is intended to be used. -->
### Direct Use
<!-- This section describes suitable use cases for the dataset. -->
The dataset is meant primarily as ground truth for training HTR models for 17th and 18th century danish handwriting. A separate dataset will be made available containing the ground truth pages for our region detection model as these only partly overlap with the ground truth for HTR. There is also a separate dataset available on Hugging Face, *DiEm HTR Numbers*, which focuses on handwritten numbers from the 18th century.
Unpacking the parquet file and putting the images in a root folder and the alto/page xmls in subfolders called 'alto' and 'page' will allow import of the transcriptions into the desktop client of Transkribus, if you want to include the dataset as training data in your Transkribus project. We have created a small tool 'UnpackRAParquet' that can help you unpack the parquet-files in the proper structure, which is included in the tools/ subfolder of this dataset. Windows binary: [UnpackRAParquet.exe](https://huggingface.co/datasets/RA-Data-Science/DiEm_HTR/blob/main/tools/UnpackRAParquet1.0.0.exe) (SHA256: 22ca34cc3f6a1490a96158b5ec0454094d6e776b3b45aa6627f50e44f2ed2c3b)
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
The dataset is not suited for training textline polygon extraction models, as the polygons have been generated by Transkribus and not manually adjusted.
The dataset is not suitable for training models for baseline detection either since some blurred/unreadable words in the beginning and ending of a line has been cut out. Some blurred/unreadable lines has also been left unmarked.
Finally we advice using the *DiEm Regions* dataset if you want to train a model to detect text regions, as the regions within the Diem HTR dataset has not been manually validated. The *DiEm Regions* dataset should be made available here on Hugging Face in the winter 2025-26.
## Dataset Structure
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
Each data instance represents a single scanned, segmented and transcribed image with handwritten text corresponding to either 1 or 2 physical pages in the parish registers.
The dataset contains the following fields:
- `image`: a jpeg image containing a scan of the original physical page
- `doc_id`: internal id of parent parish register (book) to which the page belongs used at the National Archives of Denmark
- `sequence`: an incremental id denoting the order of the page within the parent document
- `alto`: an xml-encoded string containing layout and content information of the physical page, stored in [ALTO XML, version 4](https://www.loc.gov/standards/alto/v4/alto.xsd)
- `page`: an xml-encoded string containing layout and content information of the physical page, stored in [PAGE XML, version 2013-07-15](https://www.primaresearch.org/schema/PAGE/gts/pagecontent/2013-07-15/pagecontent.xsd)
To uniquely identify a single page within the dataset, one can use the `doc_id` integer in combination with the `sequence` integer.
## Dataset Creation
### Curation Rationale
<!-- Motivation for the creation of this dataset. -->
The dataset constitutes the ground truth HTR created through the Transkribus interface as part of the DiEm project, managed by the National Archives of Denmark. The project seeks to correctly read all the danish parish registers before 1813. The books included in the ground truth dataset has been selected to represent the variance in handwriting style through the period 1650-1800 as well as possible. Likewise we have tried to include books containing all the events that might be described in parish registers (baptisms, confirmations, marriages and burials).
### Source Data
<!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
The source data is the parish registers written by parish clerks and priests in the danish parishes in the period ~1650-1800. They parimarily describe the clerical events carried out for the people of the parish, noting among other things names and dates at baptisms, confirmations, marriages and burials.
#### Data Collection and Processing
<!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
Already existing transcriptions of parish records that were transcribed true to the source and therefore suitable to become Ground Truth were collected and manually inserted in Transkribus by the project workers. Since most of the parish records the project needs to text recognize are from the 18th century, most of our training data (around 70%) are from that period.
Volunteers in the DiEm-project have proofread all the parish records to Ground Truth in Transkribus following the project’s proofreader guide, so the proofreading is as similar as possible even though several people contributed to it. The project workers assisted the volunteers in the process.
#### Who are the source data producers?
<!-- This section describes the people or systems who originally created the data. It should also include self-reported demographic or identity information for the source data creators if this information is available. -->
The transscriptions used initially as ground truth training data has been created by various genealogists in Denmark, often as part of research into their own ancestry. The transscriptions have since been verified and corrected by project workers.
The original books were written by parish clerks and priests. The scans of the books have been made partly at the department of retrodigitization at the National Archives of Denmark and partly by project volunteers.
### Annotations [optional]
<!-- If the dataset contains annotations which are not part of the initial data collection, use this section to describe them. -->
#### Annotation process
<!-- This section describes the annotation process such as annotation tools used in the process, the amount of data annotated, annotation guidelines provided to the annotators, interannotator statistics, annotation validation, etc. -->
The DiEm-project’s volunteers have used the Unclear-tag in Transkribus whenever they have come across a word that was unreadable. They also marked underlined words, super- and subscript by using Transkribus’ text editor.
#### Who are the annotators?
<!-- This section describes the people or systems who created the annotations. -->
Annotations have been created by participants in the DiEm projects at the National Archives of Denmark.
#### Personal and Sensitive Information
<!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
The dataset contains no personal, private or sensitive information as all information is over 200 years old.
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
Be advised that the language used in the text is somewhat limited as it concerns baptisms, confirmations, marriages and burials, and there therefore is a predominance of dates and names when compared to natural language.
Most of the training data consists of baptisms (around 42%) followed by burials (around 24%). Around 10% are marriages and 4% confirmations. The rest are chronological kept parish records, where we assume that the grouping of events are roughly the same. Most of the training data are from the 18th century (around 70%) and the rest are from the 17th century.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users should be aware that:
- We do not use diacritical signs in the training data. For example, we transcribe the letter ‘ö’ as ø.
- We mark unreadable words with ‘##’ in the text, and tag them with the Unclear-tag in Transkribus.
- We use strikethrough, underline, sub- and superscript in the training data.
- Only the Ground Truth pages from the parish records are a part of this dataset.
- We always use the sign ¬ when there are hyphenated words in the text.
- The following special characters are present in the dataset: °, ¼, ½, ¾, ÷, ɔ, Θ, Ω, ψ, †, ☿, ♂
- Nine of the parish records are manually transcribed and seven are recognised using early versions of the DiEm-projects text recognition models and corrected afterwards.
## Citation
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
[N/A]
## Glossary
<!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
{{ glossary | default("[More Information Needed]", true)}}
## More Information
Our thanks and gratitude goes to the Augustinus Foundation for funding the DiEm project, as well as to all the volunteers whose contributions big and small are vital to the success of the project.
## Dataset Card Contact
**Point of Contact:** [Markus Schunck](masc@rigsarkivet.dk)