Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    ValueError
Message:      Invalid string class label MEDUSA_Synthetic_Lines@a2e668793e0817b038f3b4cf9c5436e218d9ac7e
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
                  return get_rows(
                         ^^^^^^^^^
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
                  rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2240, in __iter__
                  example = _apply_feature_types_on_example(
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2157, in _apply_feature_types_on_example
                  encoded_example = features.encode_example(example)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 2152, in encode_example
                  return encode_nested_example(self, example)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1437, in encode_nested_example
                  {k: encode_nested_example(schema[k], obj.get(k), level=level + 1) for k in schema}
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1460, in encode_nested_example
                  return schema.encode_example(obj) if obj is not None else None
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1143, in encode_example
                  example_data = self.str2int(example_data)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1080, in str2int
                  output = [self._strval2int(value) for value in values]
                            ^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1101, in _strval2int
                  raise ValueError(f"Invalid string class label {value}")
              ValueError: Invalid string class label MEDUSA_Synthetic_Lines@a2e668793e0817b038f3b4cf9c5436e218d9ac7e

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

MEDUSA Synthetic Lines

This dataset contains 500,000 synthetic line images generated for the Silver stage of the MEDUSA training curriculum. It was produced at the École nationale des chartes – PSL as part of the MEDUSA project for multilingual medieval handwritten text recognition (HTR).


Motivation

Many medieval languages — particularly Germanic, Celtic, and Slavic ones — are underrepresented in existing image–text HTR corpora. Text-only (Silver) resources, however, exist for a much broader range of languages and time periods. This dataset operationalises those resources by rendering them as plausible synthetic manuscript line images, providing the MEDUSA model with lexical and script-level priors for languages that would otherwise receive little or no visual supervision.


Generation pipeline

The pipeline proceeds in six stages:

  1. Snippet sampling — words are drawn by a sliding window (1–16 words) over a shuffled index of the multilingual Silver corpus, with language tags inferred from filename prefixes and MD5-based deduplication across runs.
  2. Rendering — text is rendered using a CMAP-validated font pool with Junicode as a universal fallback, via Pillow+RAQM (HarfBuzz shaping) with OpenType features (liga, kern, calt); Skia serves as a secondary fallback.
  3. Ink simulation — morphological distortion (dilation/erosion), elastic warping, and photometric degradations (blur, noise, intensity gradients, local fading, pixel dropout) are applied stochastically; ink colour is sampled from a distribution over deep black, ferrogallate brown, sepia, and faded dark brown.
  4. Background composition — the ink mask is composited onto a real manuscript scan patch drawn uniformly from a background pool.
  5. Scan degradation — an Albumentations pipeline applies ten stochastic transforms (sensor noise, motion/defocus blur, JPEG compression, downscaling, brightness/contrast jitter, gamma correction, HSV shift for parchment yellowing, CLAHE, sharpening, and rectangular masking for lacunae).
  6. Document effects — seam-crop edges simulating adjacent lines in tight crops, foxing spots (p=0.25), and bleed-through from a mirrored verso (p=0.18).

Each output is a JPEG at variable quality with a corresponding JSONL metadata entry (transcription, language, font, background id). The pipeline is idempotent across interruptions.

For full technical details, see the MEDUSA system report.


Source corpora

Text is sampled uniformly across languages from the following text-only historical corpora. Words are sampled uniformly across languages to partially compensate for corpus size imbalances.

Dataset Language Reference
Helsinki Corpus Old English / Middle English [1]
Floris and Blancheflour Old English [2]
Diakorp Old Czech [3]
Hadewijch Middle Dutch [4]
CELT Old Irish / Middle Irish [5]
Referenzkorpus Altdeutsch Old High German [6]
Referenzkorpus Mittelhochdeutsch Middle High German [7]
Referenzkorpus Mittelniederdeutsch Middle Low German [8]
CTA Old / Middle Portuguese [9]
CIPM Old / Middle Portuguese [10]
CODEA Old Castilian [11]
OSTA Old Castilian [12]
Biblia Medieval Old Castilian [13]
Milione Venetian [14]
BFM Old / Middle French [15]
Chrétien de Troyes Old / Middle French [16]
Geste Old / Middle French [17]
Otinel Old / Middle French [18]
Menota Old Norse / Icelandic [19]
EAE Old Norse / Icelandic [20]
Flores och Blanzeflor Old Swedish [21]
Italian Paleography Old Italian [22]
CLTK Latin Library Latin [23]
Medieval Latin Latin [24]
Kochanowski Old Polish [25]

The total Silver corpus covers over 20 million words across these sources.


Dataset structure

The dataset is distributed as a zip archive structured by language, ready for use with DocWorkflow. Each language has its own subdirectory containing paired JPEG/ALTO XML files, one pair per line image:

silver_lines.zip
├── osp/
│   ├── line_0000001.jpg
│   ├── line_0000001.xml
│   ├── line_0000002.jpg
│   ├── line_0000002.xml
│   └── ...
├── lat/
│   └── ...
├── fro/
│   └── ...
└── ...  (one folder per language ISO 639-3 code)

Each XML file is a minimal ALTO v4 document describing a single text line. The transcription is stored in the CONTENT attribute of the <String> element:

<?xml version='1.0' encoding='UTF-8'?>
<alto xmlns="http://www.loc.gov/standards/alto/ns-v4#"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v4#
                          http://www.loc.gov/standards/alto/v4/alto-4-2.xsd">
  <Description>
    <MeasurementUnit>pixel</MeasurementUnit>
    <sourceImageInformation>
      <fileName>line_0037740.jpg</fileName>
      <fileIdentifier>line_0037740.jpg</fileIdentifier>
    </sourceImageInformation>
  </Description>
  <Tags>
    <OtherTag ID="tag_0" LABEL="DefaultLine" DESCRIPTION="line DefaultLine" />
  </Tags>
  <Layout>
    <Page ID="page1" PHYSICAL_IMG_NR="1" HEIGHT="67" WIDTH="1310">
      <PrintSpace HEIGHT="67" WIDTH="1310" VPOS="0" HPOS="0">
        <TextBlock HEIGHT="67" WIDTH="1310" VPOS="0" HPOS="0"
                   ID="block_0" TAGREFS="tag_0">
          <TextLine HEIGHT="67" WIDTH="1310" VPOS="0" HPOS="0"
                    ID="line_0" BASELINE="0,33 1310,33">
            <Shape>
              <Polygon POINTS="0,0 1310,0 1310,67 0,67" />
            </Shape>
            <String CONTENT="conten tres capitolos Os erros son tantos - e"
                    WC="1.0" />
          </TextLine>
        </TextBlock>
      </PrintSpace>
    </Page>
  </Layout>
</alto>

Each JPEG contains a single line image; the corresponding XML carries the ground-truth transcription and the bounding-box geometry of that line. This format is directly compatible with DocWorkflow's VLMLineHTR task without any conversion step.


License

The synthetic images are released under CC BY 4.0. The underlying text corpora are subject to their own licenses; please consult each source for details. All source corpora used here are either in the public domain or available under open licenses compatible with research use.


References

[1] Helsinki Corpus TEI XML Edition (2011). Designed by Alpo Honkapohja et al. Based on The Helsinki Corpus of English Texts (1991).

[2] Draschner, M., Edlich-Muth, M. Raw text edition of the Middle English 'Floris and Blancheflour' in Edinburgh, National Library of Scotland, MS Advocates 19.2.1 (Jan 2026). https://doi.org/10.5281/zenodo.18244892

[3] Kučera, K., Řehořková, A., Stluka, M. Diakorp v6: Diachronic Corpus of Czech. LINDAT/CLARIAH-CZ (2015). http://hdl.handle.net/11234/1-5413

[4] Haverals, W., Kestemont, M. From exemplar to copy: the scribal appropriation of a Hadewijch manuscript computationally explored. JDMDH 23. https://doi.org/10.46298/jdmdh.10206

[5] Ó Corráin, D. et al. CELT: Corpus of Electronic Texts (1997). http://www.ucc.ie/celt

[6] Donhauser, K. et al. Referenzkorpus Altdeutsch (750–1050) (2022), version 1.2. https://www.deutschdiachrondigital.de/rea/

[7] Roussel, A. et al. Referenzkorpus Mittelhochdeutsch (1050–1350) (2024), version 2.1. https://www.linguistics.ruhr-uni-bochum.de/rem/

[8] ReN-Team. Reference Corpus Middle Low German/Low Rhenish (1200–1650) (2021), version 1.1. https://doi.org/10.25592/uhhfdm.9195

[9] Sobral, C., Cardeira, E. Corpus de Textos Antigos (CTA). http://teitok.clul.ul.pt/teitok/cta/

[10] Xavier, M.F. O CIPM — Corpus Informatizado do Português Medieval. In: Kabatek, J. (ed.), De Gruyter (2016). https://doi.org/10.1515/9783110462357-007

[11] GITHE. CODEA+ 2022. Corpus de documentos españoles anteriores a 1900 (2022). https://doi.org/10.37536/CODEA.2015

[12] Old Spanish Textual Archive (OSTA) (2026). https://github.com/hispanicseminary/OSTA

[13] Enrique-Arias, A., Pueyo Mena, F.J. Biblia Medieval (2008). https://bibliamedieval.es

[14] Burgio, E. et al. Dei Viaggi di Messer Marco Polo [...]: Edizione digitale (2015). https://risorse-esterne.edizionicafoscari.it/

[15] Guillot, C., Heiden, S., Lavrentiev, A. Base de français médiéval. Diachroniques 7, 168–184 (2018). https://shs.hal.science/halshs-01809581

[16] Kunstmann, P., Martineau, F. Chrétien de Troyes sur le web (2000). https://doi.org/10.16995/dscn.176

[17] Camps, J.-B. et al. Geste: un corpus de chansons de geste, 2016–... (Apr 2019). https://doi.org/10.5281/zenodo.2630574

[18] Camps, J.-B. La Chanson d'Otinel: édition complète du corpus manuscrit (Dec 2017). https://doi.org/10.5281/zenodo.1116736

[19] Medieval Nordic Text Archive (Menota). https://clarino.uib.no/menota/home. Founded 2001, part of CLARIN since 2016.

[20] The Arnamagnæan Institute, Copenhagen. Editiones Arnamagnæanæ Electronicæ (EAE). https://eae.ku.dk/

[21] Worrall, E., Edlich-Muth, M. Raw text edition of the Old Swedish "Flores och Blanzeflor" (Sep 2025). https://doi.org/10.5281/zenodo.17093371

[22] Magni, I., Markey, L., Signorini, M. Italian Paleography (2019). https://italian.newberry.t-pen.org/

[23] Classical Language Toolkit (CLTK): lat_text_latin_library. https://github.com/cltk/lat_text_latin_library. Texts in the public domain.

[24] Corbara, S. et al. Two datasets for the computational authorship analysis of medieval Latin texts (Jun 2020). https://doi.org/10.5281/zenodo.4298503

[25] Kochanowski, J. Works of Jan Kochanowski. Wikiźródła (Polish Wikisource). https://pl.wikisource.org/wiki/Autor:Jan_Kochanowski


Citation

If you use this dataset in your research, please cite:

@unpublished{moins:hal-05600991,
  TITLE = {{MEDUSA 0.1: Medieval European Documents Unified System for Automated text recognition System Report for the ICDAR 2026 Competition on Multilingual Medieval Handwritten Text Recognition}},
  AUTHOR = {Moins, Th{\'e}o and Cafiero, Florian and Camps, Jean-Baptiste and Conte, Lilla and Guidi, Emilie and Hensley, Brenna and Kapitan, Katarzyna and Macedo, Carolina and Peratello, Paola and Vermaas, Cecile and Vidal-Gor{\`e}ne, Chahan},
  URL = {https://enc.hal.science/hal-05600991},
  NOTE = {working paper or preprint},
  YEAR = {2026},
  MONTH = Apr,
  HAL_ID = {hal-05600991},
  HAL_VERSION = {v1},
}

Funding

Funded by the European Union (ERC, LostMA, 101117408). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.

This work has received support under the Major Research Program of PSL Research University ``CultureLab'' launched by PSL Research University and implemented by ANR with the references ANR-10-IDEX-0001.

Ce travail a bénéficié d'une aide de l'État gérée par l'Agence Nationale de la Recherche au titre de France 2030 portant la référence « ANR-23-IACL-0008»).

Biblissima+ bénéficie d'une aide de l'Etat gérée par l'ANR au titre du Programme d'investissements d'avenir intégré à France 2030, portant la référence ANR-21-ESRE-0005.

This work was granted access to the HPC resources of IDRIS under the allocation 2026-AD011015914R1 made by GENCI.

Downloads last month
-

Collection including ENC-PSL/MEDUSA_Synthetic_Lines