Datasets:
annotations_creators:
- expert-generated
language:
- ca
- la
license:
- cc-by-sa-4.0
pretty_name: AMSMB-line-transcription
size_categories:
- 1K<n<10K
tags:
- handwritten-text-recognition
- htr
- transcription
task_categories:
- image-to-text
dataset_info:
features:
- name: id
dtype: string
- name: text
dtype: string
- name: image
dtype: image
- name: reference
dtype: string
- name: line_type
dtype: string
- name: region_type
dtype: string
- name: year
dtype: string
- name: century
dtype: string
- name: hand
dtype: string
- name: document_type
dtype: string
splits:
- name: train
num_examples: 2067
- name: validation
num_examples: 661
- name: test
num_examples: 641
Dataset Card
Dataset for line-level handwritten text recognition on medieval historical manuscripts, consisting of 3,369 lines (images of text lines with the associated transcription and metadata) from 100 digitized documents written by at least 80 different hands and spanning three centuries (from 1208 to 1499). This dataset is derived from the AMSMB dataset, which contains the full-page images of the digitized manuscripts and their associated transcriptions in the PageXML format.
Dataset Description
This is a dataset for line-level handwritten text recognition of medieval manuscripts, focusing on notarial charters written on parchment from the 13th to 15th centuries. The dataset is comprised of 3,369 lines from 100 digitized manuscripts that were carefully selected to represent the large variation that is present in the sources, encompassing at least 80 distinct hands and various document types (from sales and inventories to last wills and marriage contracts). Written primarily in Medieval Latin with fragments in Medieval Catalan, the manuscripts exhibit varying stages of preservation and degrees of deterioration.
- Curated by: Computational Social Sciences and Humanities Laboratory (CSSH) at the Barcelona Supercomputing Center (BSC), and, in particular, by the Computational Archival History research line, with support from the Data Infrastructure, Models, and Methods group.
- Languages: Catalan (
ca-CA
) and Latin (la-LA
). The manuscripts are written primarily in Medieval Latin, but there is a strong linguistic influence from the vernacular Catalan language, both lexically (through loanwords and expressions) and syntactically (e.g., mirroring Catalan word order). In addition, Catalan is used instead of Latin in verbatim statements or utterances, and in specific documents. - License: CC BY-SA 4.0.
- Repositories: BSC Dataverse (original dataset), HuggingFace (derived dataset), and HTR-Catalog (dataset record).
Composition
The original dataset consists of 100 images (digitized medieval charters written on parchment) and their associated 100 PageXML files. The dataset is split into train (60 documents), validation (20 documents), and test (20 documents). This derived dataset is comprised of 3,369 lines, each consisting of the polygon-shaped image of the line, its transcription, and associated metadata.
Dataset Structure
The dataset consists of three .parquet
files (for train
, validation
, and test
), in which each row corresponds to a line from a medieval notarial charter.
The train
split consists of 2,067 rows; the validation
split, of 661 rows; and the test
split, of 641 rows. Each row has the following fields:
id
(string
): the line identifier.text
(string
): the transcription of the line.image
(image
): the polygon-shaped image of the line.reference
(string
): the reference of the image, which consists of the acronym of the archive ("AMSMB") and the signature of the manuscript (e.g.,AMSMB_1-1-17
).line_type
(string
): type of line, either "DefaultLine" or "InterlinearLine".region_type
(string
): type of region containing the line, either "MainZone" or "MarginZone".year
(string
): the year when the manuscript was written.century
(string
): the century when the manuscript was written.hand
(string): the hand, i.e., the scrivener or notary who wrote the manuscript.document_type (string)
: type of document (e.g., oath, grant of rights, pledge, etc).
The following table summarizes the dataset:
manuscripts | lines | 13C | 14C | 15C | hands | avg chars | avg words | |
---|---|---|---|---|---|---|---|---|
train | 60 | 2067 | 627 | 553 | 887 | 46 | 204 | 30 |
validation | 20 | 661 | 183 | 170 | 308 | 18 | 190 | 28 |
test | 20 | 641 | 173 | 219 | 249 | 20 | 177 | 27 |
Where manuscripts
is the number of distinct manuscripts (i.e., documents, images) from which lines are drawn; lines
is the number of lines in the split; 13C
, 14C
and 15C
is the number of lines from manuscripts written in the 13th, 14th and 15th centuries respectively; hands
is the number of distinct known hands (i.e., notaries or scriveners) of the manuscripts from which lines are drawn; avg chars
is the average character length of the transcribed lines; and avg words
is the average word length of the transcribed lines.
Dataset Creation
Curation Rationale
The Computational Archival History research line focuses on creating datasets, training models, and developing tools for processing and extracting text from historical documents, making their content accessible to researchers and the general public.
Source Data
The charters come from the Archive of the Marquises of Santa Maria de Barberà (AMSMB), the most noteworthy private nobility archive in Catalonia. Its holdings include over 11K charters on parchment, of which 7.5K are from the 13th to the 15th centuries. In 1985, the archive began the pioneering process of describing its parchment collection using a bespoke software and database system that were commissioned to overcome the limitations of documenting the collections by hand. In the early 2000s, an agreement was signed with the town council of Vilassar de Dalt to make the archive's holdings available for public consultation. This gave rise to an annual digitization campaign, starting with the parchment collection, the only one that had been fully described. Descriptions and images (in the TIFF format) were then integrated into a document management system to facilitate consultation to researchers. The archive is located at the castle of the Marquises of Santa Maria de Barberà in Vilassar de Dalt, home of the de Sarriera family, who financed all projects.
Sampling Rationale
The charters in our dataset were carefully sampled to represent, to the extent possible, the large variation that is present in the sources. They are written by at least 80 known hands (and several others unknown) across three centuries (from 1208 to 1499) throughout the Catalan-speaking lands. Their contents are classified into 29 different document types. The documents are also diverse in terms of shape (with height-to-width ratios that range from 0.46 to 1.46), number of lines per charter (between 8 and 106 lines), and line lengths (with averages ranging from 84 to 341 characters). They display different stages of preservation, levels of brightness and contrast, and types of deterioration, such as holes, folds, stains, discoloured areas, and ink loss or fading.
Preprocessing
Given the large size of the documents, resulting in large TIFF files (images up to 650MB), we programmatically converted the TIFF files to JPEG files using the PIL library for python.
A locally installed instance of the eScriptorium (version 0.14.2) was used to manually align the transcription with the image. Lines were automatically detected using the default blla segmentation model provided by Kraken and eScriptorium, and were manually reviewed and corrected. Each line was then transcribed by an expert paleographer. The resulting annotations and transcriptions were downloaded using the PageXML format.
This line-level transcription dataset has been generated using the parse-pagexml python package, which loads a set of images of digitized documents and their associated PageXML files (and, optionally, metadata), extracts segmented lines from the digitized images by means of the annotations in the PageXML files, and stores the resulting line-level dataset in the .parquet
format.
Annotations and Transcription
Documents have been transcribed by an expert paleographer with decades of experience working with medieval manuscripts. The annotation and transcription decisions are documented in the datasheet (datasheet.pdf
) accompanying the original dataset.
Considerations for Using the Data
The dataset was created with the aim of training line-level transcription models for charters written on parchment in Gothic cursive script, in Medieval Latin or Catalan, from the 13th to 15th centuries. The dataset has not been tested for other uses, which may be out-of-scope.
Bias, Risks, and Limitations
You may find a discussion of ethical considerations, discussion of biases, and potential societal impact in the datasheet accompanying the original dataset.
Out-of-Scope Use
The test split of this dataset should not be used as training data of generic models, for it to remain valuable as test set.
Citation Information
If you use this dataset, please cite the original dataset:
@misc{amsmb_htr_2025,
title={{AMSMB HTR: A Dataset for Handwritten Text Recognition in Medieval Notarial Charters Written on Parchment (1208-1499)}},
publisher={BSC Dataverse},
author={Coll Ardanuy, Mariona and Cuadrada, Coral and Sarobe, Ramon},
year={2025},
url={https://dataverse.bsc.es/dataset.xhtml?persistentId=perma:BSC/0VB0MC}
}
Coll Ardanuy, M., Cuadrada, C., & Sarobe, R. (2025). AMSMB HTR: A Dataset for Handwritten Text Recognition in Medieval Notarial Charters Written on Parchment (1208-1499) [Dataset]. BSC Dataverse. https://dataverse.bsc.es/dataset.xhtml?persistentId=perma:BSC/0VB0MC
The original dataset is described in the paper:
@inproceedings{ardanuy2025evaluating,
title={Evaluating Handwritten Text Recognition in Medieval Notarial Manuscripts: a New Dataset and Comprehensive Analysis},
booktitle={International Conference on Document Analysis and Recognition},
author={Coll Ardanuy, Mariona and Berganzo-Besga, Iban and Sarobe, Ramon and Cuadrada, Coral},
year={2025 (forthcoming)}
}
Coll Ardanuy, M., Berganzo-Besga, I., Sarobe, R., & Cuadrada, C. (2025, forthcoming). Evaluating Handwritten Text Recognition in Medieval Notarial Manuscripts: A New Dataset and Comprehensive Analysis. International Conference on Document Analysis and Recognition. ICDAR2025.
Acknowledgements
The digitized images of the parchments have been provided by the Arxiu Municipal de Vilassar de Dalt (AMVD), through its agreement with the Arxiu dels Marquesos de Santa Maria de Barberà (AMSMB). Coral Cuadrada would like to thank His Excellency Mr. Ramon de Sarriera for facilitating public consultation of the AMSMB Parchment Fund. Reproducibility and open access support was provided by Adrián Carrascosa, at the Data Infrastructure, Models, and Methods group (CSSH Laboratory at BSC). Mariona Coll Ardanuy and Adrián Carrascosa acknowledge their AI4S fellowship within the “Generación D” initiative by Red.es, Ministerio para la Transformación Digital y de la Función Pública, for talent attraction (C005/24-ED CV1), funded by NextGenerationEU through PRTR.
Dataset and Dataset Card Contacts
Adrián Carrascosa (adrian.carrascosa@bsc.es) and Mariona Coll Ardanuy (mariona.coll@bsc.es).