Datasets:

Modalities:
Image
Text
Formats:
arrow
Libraries:
Datasets
License:
kb-books / README.md
balsab's picture
more files + README update (#16)
facbeb0 verified
---
license: cc0-1.0
---
# open-rdl-books
## Dataset Description
| | |
| ----------- | ----------- |
| **Language** | dan, dansk, Danish |
| **License** | Public Domain, cc0-1.0 |
### Dataset Summary
Documents from the [Royal Danish Library](https://www.kb.dk/en) published between 1750 and 1930.
The dataset has each page of each document in image and text format. The text was extracted with [OCR](https://en.wikipedia.org/wiki/Optical_character_recognition).
The documents (books of various genres) were obtained from the library. The dataset was assembled to make these public domain Danish texts more accessible.
## Dataset Structure
### Data Instances
```
{
"doc_id": "unique document identifier",
"page_id": "unique page identifier",
"page_image":"image of the page, extracted from a pdf",
"page_text": "OCRed text of the page, extracted from a pdf",
"author" : "name of the author. If more than one, separated by ';' ",
"title" : "document title",
"published" : "year of publishing",
"digitalized" : "year of processing the physical document by the library",
"file_name" : "file_name of the original PDF"
}
```
The "page_text" was obtained through OCR, and is therefore likely to contain noisy data, especially in older documents, where the original text is either handwritten or printed in exaggerated fonts.
"author" and "title" may be missing, especially in documents published before 1833.
"digitalized" may be missing.
### Data Splits
All data is in the "train" split.
[Data](https://huggingface.co/datasets/chcaa/kb-books/tree/main/data) is organized by year of publication, and is segmented into ~5GB chunks.
## Dataset Creation
### Curation Rationale
The dataset makes public domain text data more accessible to whomever may wish to view it or use it.
The dataset was created for the projects:
- [Danish Foundation Models](https://www.foundationmodels.dk)
- [Golden Matrix](https://chc.au.dk/research/golden-matrix)
The documents were filtered to make sure no non-public domain data is added. See [pd_check.md](./pd_check/pd_check.md) for the confirming of public domain status and [scraping.md](./scrape/scraping.md) for collecting possible Danish authors.
### Source Data
Data consists of OCRed documents from the [Royal Danish Library](https://www.kb.dk/en) published between 1750 and 1930.
These documents are mostly books of various genres. No distinction was made among the documents based on genre. Additional to the text, the original PDF pages are also added as images for potentially improving the quality of text.
The source data was made by humans, chiefly danish speaking authors, poets and playwrights.
### Data Extraction
#### Logic
The whole python script is provided for reference as [extract_data.py](./extract_data.py)
For more detailed information the other scripts see
[pd_check](./pd_check/pd_check.md) and [scraping](./scrape/scraping.md)
<details>
<summary>General Data Extraction</summary>
<br>
flowchart is for a broad understanding and is not a fully accurate representation.
![Logic flowchart](./imgs/extract_flowchart.jpg)
</details>
<details>
<summary>Confirm Public Domain</summary>
<br>
flowchart is for a broad understanding and is not a fully accurate representation.
![Logic flowchart]()
</details>
## Additional Information
### Citation
If you use this work please cite:
```
@report{open-rdl-books,
title={Public domain books from the Danish Royal Library},
author={Szabo, Balazs and Vahlstrup, Peter and Møldrup-Dalum, Per and Nielbo, Kristoffer L. and Enevoldsen, Kenneth},
year={2025}
}
```
### Personal and Sensitive Information
This dataset is under the public domain and, to our knowledge, does not contain personally sensitive information.
### Bias, Risks, and Limitations
The works in this collection are historical, and thus they reflect the linguistic, cultural, and ideological norms of their respective times. As such, it includes perspectives, assumptions, and biases characteristic of the period, likely including stances that we would now deem inappropriate.
### Notice and takedown policy
We redistribute files under the public domain or with a license permitting redistribution.
If you have concerns about the licensing of these files, please contact us. If you consider that the data contains material that infringes your copyright, please:
Clearly identify yourself with detailed contact information, such as an address, a telephone number, or an email address at which you can be contacted.
Clearly reference the original work claimed to be infringed
Clearly identify the material claimed to be infringing and information reasonably sufficient to allow us to locate the material.
We will comply with legitimate requests by removing the affected sources from the next release of the dataset.
### Dataset Curators
The dataset was created for use in these projects by the [Center for Humanities Computing](https://chc.au.dk/) at Aarhus University:
- [Danish Foundation Models](https://www.foundationmodels.dk)
- [Golden Matrix](https://chc.au.dk/research/golden-matrix)
### License
The documents in the dataset are part of the [public domain](https://creativecommons.org/public-domain/)