Datasets:

Modalities:
Image
Text
Formats:
arrow
Libraries:
Datasets
License:
kb-books / README.md
KennethEnevoldsen's picture
adding documentation (#3)
55a2ae3 verified
|
raw
history blame
3.4 kB
metadata
license: cc0-1.0

KB-Books

Dataset Description

Dataset Summary

Documents from the Royal Danish Library published between 1750 and 1930.

The dataset has each page of each document in image and text format. The text was extracted with OCR at the time of digitization.

The documents (books of various genres) were obtained from the library in .pdf format with additional metadata as .json files. The dataset was assembled to make these public domain Danish texts more accessible.

Languages

All texts are in Danish.

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 in ./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 to be used mainly for research purposes and Natural Language Processing tasks.

The documents were filtered to make sure no non-public domain data is added. See pd_check.md for the confirming of public domain status and scraping.md for collecting possible Danish authors.

IMPORTANT: In case non-public domain data is found in the dataset, please let us know

Source Data

Data consists of OCRed documents from the Royal Danish Library 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 flowchart is for a broad understanding and is not a fully accurate representation.

Logic flowchart

The whole python script is provided for reference as extract_data.py

Made with:

  • python 3.12.10

Required libraries for running:

Additional Information

Dataset Curators

write something here

License

The documents in the dataset are part of the public domain