DiEm_HTR-Numbers / README.md
JoenRommedahl's picture
Update README.md
5b79600 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 Numbers - numerical danish handwriting from the 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 Numbers
<!-- Provide a quick summary of the dataset. -->
The *DiEm HTR Numbers* dataset is a ground truth dataset consisting of numbers written in historical danish handwriting from the 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 in the dataset *DiEm HTR*. In order to make our HTR-models better at recognizing numbers, we created 298 extra pages of ground truth only consisting of numbers from the same period, which is available here in the *DiEm HTR Numbers* dataset.
The *DiEm HTR Numbers* dataset consists of 298 transcribed images, containing a total of 28850 text lines and 29067 "words"/numbers.
Manually chosen pages (meaning that not all pages from the archive series are a part of the dataset) that contains many numbers from the following archive series are part of the dataset:
| doc_id | archive_series | period | notes |
|---|---|---|---|
| 9177795 | Blandet indhold - Asiatisk Kompagni, Afdelingen i København - Negotiejournal ; Asiatisk Kompagni, Afdelingen i Trankebar - Hovedbog | 1719-1775 | Consists of pages from two archive series: Asiatisk Kompagni, Afdelingen i København – Negotiejournal and Asiatisk Kompagni, Afdelingen i Trankebar – Hovedbog. |
| 9476418 | Rentekammeret - Christian 5.s matrikel. Markbog samt eng-, skov- og græsningstaksationer | 1681-1691 | |
| 9182178 | Rentekammeret - Efterretninger om ægtepar, enkemænd og enker for København, Amager, Bornholm, Møn og Sjælland | 1771-1771 | The archive series is also called ”Oeders efterretninger”. |
| 9178140 | Rentekammeret - Folketælling 1787, Landdistrikter | 1787-1787 | |
- **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 of numbers from the 18th century Denmark for training HTR models. A separate dataset is available containing ground truth of text (DiEm HTR), and another 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.
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 the main DiEm 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 only chosen numbers has been annotated and the text on the pages has been ignored.
Finally we advice using the *DiEm Regions* dataset if you want to train a model to detect text regions, as the regions within this dataset has been manually drawn only to contain numbers on the pages. 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 numbers corresponding to either 1 or 2 physical pages from the archive series.
The dataset contains the following fields:
- `image`: a jpeg image containing a scan of the original physical page
- `doc_id`: the Document ID used inside Transkribus for the document in context of the DiEm project
- `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 consisting of numbers 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 archive series included in the ground truth dataset has been selected to represent how numbers were written in 18th century Denmark to make our HTR-model made from the DiEm HTR-dataset better at recognizing numbers.
### Source Data
<!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
The source data is sampled from various sources. The source data from the Danish Asiatic Company and derived from a trade journal and a ledger. From the Rentekammeret (the Treasury) we use pages from three archive series: First from Christian V of Denmark’s land register, secondly from the registry of married couples, widower and widows and third from the 1787 national census.
#### 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. -->
Only readable, integral numbers were manually marked with a baseline. Some of the numbers were then automatically text recognized with Transkribus’ supermodel The Text Titan I ter, while others were manually transcribed. Some numbers are followed by a character like ‘.’, ‘,’ or ‘:’, but most numbers stand alone. Some numbers are single-digit numbers while others consists of multiple digits. All of the numbers are proofread to Ground Truth.
#### 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 DiEm project’s project workers created the annotations. The original books were written by various administrative and commercial actors in the 17th and 18th century. The scans of the books have been made at the department of retrodigitization at the National Archives of Denmark.
### Annotations
<!-- 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. -->
Numbers were manually identified on the selected pages, and had baselines and annotation added manually.
#### 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 dataset was created specifically to improve predictions of numbers in the DiEm project, which means that the images are only partly annotated: Only numbers and in some cases the following characters are given a baseline and an annotation.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users should be aware that:
- Only manually chosen pages (containing lots of numbers) from the archive series are part of this dataset.
- Only selected numbers and characters are annotated on the pages.
- Some numbers are single-digit numbers, while others consists of multiple digits.
## Citation [optional]
<!-- 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. -->
[N/A]
## 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)