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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-to-text
|
| 5 |
+
language:
|
| 6 |
+
- fro
|
| 7 |
+
- pro
|
| 8 |
+
- ita
|
| 9 |
+
- osp
|
| 10 |
+
- cat
|
| 11 |
+
- lat
|
| 12 |
+
- gmh
|
| 13 |
+
- gml
|
| 14 |
+
- ang
|
| 15 |
+
- enm
|
| 16 |
+
- dum
|
| 17 |
+
- non
|
| 18 |
+
- swe
|
| 19 |
+
- wlm
|
| 20 |
+
- gle
|
| 21 |
+
- cze
|
| 22 |
+
- pol
|
| 23 |
+
tags:
|
| 24 |
+
- htr
|
| 25 |
+
- handwritten-text-recognition
|
| 26 |
+
- manuscripts
|
| 27 |
+
- medieval
|
| 28 |
+
- synthetic
|
| 29 |
+
- catmus
|
| 30 |
+
pretty_name: MEDUSA Synthetic Lines
|
| 31 |
+
size_categories:
|
| 32 |
+
- 100K<n<1M
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
# MEDUSA Synthetic Lines
|
| 36 |
+
|
| 37 |
+
This dataset contains **500,000 synthetic line images** generated for the Silver stage of the [MEDUSA](https://huggingface.co/ENC-PSL/Medusa0.2Line-9B) training curriculum. It was produced at the [École nationale des chartes – PSL](https://www.chartes.psl.eu/) as part of the MEDUSA project for multilingual medieval handwritten text recognition (HTR).
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## Motivation
|
| 42 |
+
|
| 43 |
+
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.
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## Generation pipeline
|
| 48 |
+
|
| 49 |
+
The pipeline proceeds in six stages:
|
| 50 |
+
|
| 51 |
+
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.
|
| 52 |
+
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.
|
| 53 |
+
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.
|
| 54 |
+
4. **Background composition** — the ink mask is composited onto a real manuscript scan patch drawn uniformly from a background pool.
|
| 55 |
+
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).
|
| 56 |
+
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).
|
| 57 |
+
|
| 58 |
+
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.
|
| 59 |
+
|
| 60 |
+
For full technical details, see the [MEDUSA system report](https://enc.hal.science/hal-05600991).
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## Source corpora
|
| 65 |
+
|
| 66 |
+
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.
|
| 67 |
+
|
| 68 |
+
| Dataset | Language | Reference |
|
| 69 |
+
|---|---|---|
|
| 70 |
+
| Helsinki Corpus | Old English / Middle English | [[1]](#ref-helsinki) |
|
| 71 |
+
| Floris and Blancheflour | Old English | [[2]](#ref-floris) |
|
| 72 |
+
| Diakorp | Old Czech | [[3]](#ref-diakorp) |
|
| 73 |
+
| Hadewijch | Middle Dutch | [[4]](#ref-hadewijch) |
|
| 74 |
+
| CELT | Old Irish / Middle Irish | [[5]](#ref-celt) |
|
| 75 |
+
| Referenzkorpus Altdeutsch | Old High German | [[6]](#ref-altdeutsch) |
|
| 76 |
+
| Referenzkorpus Mittelhochdeutsch | Middle High German | [[7]](#ref-mhd) |
|
| 77 |
+
| Referenzkorpus Mittelniederdeutsch | Middle Low German | [[8]](#ref-mnd) |
|
| 78 |
+
| CTA | Old / Middle Portuguese | [[9]](#ref-cta) |
|
| 79 |
+
| CIPM | Old / Middle Portuguese | [[10]](#ref-cipm) |
|
| 80 |
+
| CODEA | Old Castilian | [[11]](#ref-codea) |
|
| 81 |
+
| OSTA | Old Castilian | [[12]](#ref-osta) |
|
| 82 |
+
| Biblia Medieval | Old Castilian | [[13]](#ref-biblia) |
|
| 83 |
+
| Milione | Venetian | [[14]](#ref-milione) |
|
| 84 |
+
| BFM | Old / Middle French | [[15]](#ref-bfm) |
|
| 85 |
+
| Chrétien de Troyes | Old / Middle French | [[16]](#ref-chretien) |
|
| 86 |
+
| Geste | Old / Middle French | [[17]](#ref-geste) |
|
| 87 |
+
| Otinel | Old / Middle French | [[18]](#ref-otinel) |
|
| 88 |
+
| Menota | Old Norse / Icelandic | [[19]](#ref-menota) |
|
| 89 |
+
| EAE | Old Norse / Icelandic | [[20]](#ref-eae) |
|
| 90 |
+
| Flores och Blanzeflor | Old Swedish | [[21]](#ref-flores) |
|
| 91 |
+
| Italian Paleography | Old Italian | [[22]](#ref-italpal) |
|
| 92 |
+
| CLTK Latin Library | Latin | [[23]](#ref-cltk) |
|
| 93 |
+
| Medieval Latin | Latin | [[24]](#ref-medlat) |
|
| 94 |
+
| Kochanowski | Old Polish | [[25]](#ref-kochanowski) |
|
| 95 |
+
|
| 96 |
+
The total Silver corpus covers **over 20 million words** across these sources.
|
| 97 |
+
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
## Dataset structure
|
| 101 |
+
|
| 102 |
+
The dataset is distributed as a zip archive structured by language, ready for use with [DocWorkflow](https://github.com/TheoMoins/DocWorkflow). Each language has its own subdirectory containing paired JPEG/ALTO XML files, one pair per line image:
|
| 103 |
+
|
| 104 |
+
```
|
| 105 |
+
silver_lines.zip
|
| 106 |
+
├── osp/
|
| 107 |
+
│ ├── line_0000001.jpg
|
| 108 |
+
│ ├── line_0000001.xml
|
| 109 |
+
│ ├── line_0000002.jpg
|
| 110 |
+
│ ├── line_0000002.xml
|
| 111 |
+
│ └── ...
|
| 112 |
+
├── lat/
|
| 113 |
+
│ └── ...
|
| 114 |
+
├── fro/
|
| 115 |
+
│ └── ...
|
| 116 |
+
└── ... (one folder per language ISO 639-3 code)
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
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:
|
| 120 |
+
|
| 121 |
+
```xml
|
| 122 |
+
<?xml version='1.0' encoding='UTF-8'?>
|
| 123 |
+
<alto xmlns="http://www.loc.gov/standards/alto/ns-v4#"
|
| 124 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 125 |
+
xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v4#
|
| 126 |
+
http://www.loc.gov/standards/alto/v4/alto-4-2.xsd">
|
| 127 |
+
<Description>
|
| 128 |
+
<MeasurementUnit>pixel</MeasurementUnit>
|
| 129 |
+
<sourceImageInformation>
|
| 130 |
+
<fileName>line_0037740.jpg</fileName>
|
| 131 |
+
<fileIdentifier>line_0037740.jpg</fileIdentifier>
|
| 132 |
+
</sourceImageInformation>
|
| 133 |
+
</Description>
|
| 134 |
+
<Tags>
|
| 135 |
+
<OtherTag ID="tag_0" LABEL="DefaultLine" DESCRIPTION="line DefaultLine" />
|
| 136 |
+
</Tags>
|
| 137 |
+
<Layout>
|
| 138 |
+
<Page ID="page1" PHYSICAL_IMG_NR="1" HEIGHT="67" WIDTH="1310">
|
| 139 |
+
<PrintSpace HEIGHT="67" WIDTH="1310" VPOS="0" HPOS="0">
|
| 140 |
+
<TextBlock HEIGHT="67" WIDTH="1310" VPOS="0" HPOS="0"
|
| 141 |
+
ID="block_0" TAGREFS="tag_0">
|
| 142 |
+
<TextLine HEIGHT="67" WIDTH="1310" VPOS="0" HPOS="0"
|
| 143 |
+
ID="line_0" BASELINE="0,33 1310,33">
|
| 144 |
+
<Shape>
|
| 145 |
+
<Polygon POINTS="0,0 1310,0 1310,67 0,67" />
|
| 146 |
+
</Shape>
|
| 147 |
+
<String CONTENT="conten tres capitolos Os erros son tantos - e"
|
| 148 |
+
WC="1.0" />
|
| 149 |
+
</TextLine>
|
| 150 |
+
</TextBlock>
|
| 151 |
+
</PrintSpace>
|
| 152 |
+
</Page>
|
| 153 |
+
</Layout>
|
| 154 |
+
</alto>
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
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.
|
| 158 |
+
|
| 159 |
+
---
|
| 160 |
+
|
| 161 |
+
## License
|
| 162 |
+
|
| 163 |
+
The synthetic images are released under [CC BY 4.0](https://creativecommons.org/licenses/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.
|
| 164 |
+
|
| 165 |
+
---
|
| 166 |
+
|
| 167 |
+
## References
|
| 168 |
+
|
| 169 |
+
<a id="ref-helsinki"></a>[1] *Helsinki Corpus TEI XML Edition* (2011). Designed by Alpo Honkapohja et al. Based on The Helsinki Corpus of English Texts (1991).
|
| 170 |
+
|
| 171 |
+
<a id="ref-floris"></a>[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
|
| 172 |
+
|
| 173 |
+
<a id="ref-diakorp"></a>[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
|
| 174 |
+
|
| 175 |
+
<a id="ref-hadewijch"></a>[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
|
| 176 |
+
|
| 177 |
+
<a id="ref-celt"></a>[5] Ó Corráin, D. et al. *CELT: Corpus of Electronic Texts* (1997). http://www.ucc.ie/celt
|
| 178 |
+
|
| 179 |
+
<a id="ref-altdeutsch"></a>[6] Donhauser, K. et al. *Referenzkorpus Altdeutsch (750–1050)* (2022), version 1.2. https://www.deutschdiachrondigital.de/rea/
|
| 180 |
+
|
| 181 |
+
<a id="ref-mhd"></a>[7] Roussel, A. et al. *Referenzkorpus Mittelhochdeutsch (1050–1350)* (2024), version 2.1. https://www.linguistics.ruhr-uni-bochum.de/rem/
|
| 182 |
+
|
| 183 |
+
<a id="ref-mnd"></a>[8] ReN-Team. *Reference Corpus Middle Low German/Low Rhenish (1200–1650)* (2021), version 1.1. https://doi.org/10.25592/uhhfdm.9195
|
| 184 |
+
|
| 185 |
+
<a id="ref-cta"></a>[9] Sobral, C., Cardeira, E. *Corpus de Textos Antigos (CTA)*. http://teitok.clul.ul.pt/teitok/cta/
|
| 186 |
+
|
| 187 |
+
<a id="ref-cipm"></a>[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
|
| 188 |
+
|
| 189 |
+
<a id="ref-codea"></a>[11] GITHE. *CODEA+ 2022. Corpus de documentos españoles anteriores a 1900* (2022). https://doi.org/10.37536/CODEA.2015
|
| 190 |
+
|
| 191 |
+
<a id="ref-osta"></a>[12] *Old Spanish Textual Archive (OSTA)* (2026). https://github.com/hispanicseminary/OSTA
|
| 192 |
+
|
| 193 |
+
<a id="ref-biblia"></a>[13] Enrique-Arias, A., Pueyo Mena, F.J. *Biblia Medieval* (2008). https://bibliamedieval.es
|
| 194 |
+
|
| 195 |
+
<a id="ref-milione"></a>[14] Burgio, E. et al. *Dei Viaggi di Messer Marco Polo [...]: Edizione digitale* (2015). https://risorse-esterne.edizionicafoscari.it/
|
| 196 |
+
|
| 197 |
+
<a id="ref-bfm"></a>[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
|
| 198 |
+
|
| 199 |
+
<a id="ref-chretien"></a>[16] Kunstmann, P., Martineau, F. *Chrétien de Troyes sur le web* (2000). https://doi.org/10.16995/dscn.176
|
| 200 |
+
|
| 201 |
+
<a id="ref-geste"></a>[17] Camps, J.-B. et al. *Geste: un corpus de chansons de geste, 2016–...* (Apr 2019). https://doi.org/10.5281/zenodo.2630574
|
| 202 |
+
|
| 203 |
+
<a id="ref-otinel"></a>[18] Camps, J.-B. *La Chanson d'Otinel: édition complète du corpus manuscrit* (Dec 2017). https://doi.org/10.5281/zenodo.1116736
|
| 204 |
+
|
| 205 |
+
<a id="ref-menota"></a>[19] *Medieval Nordic Text Archive (Menota)*. https://clarino.uib.no/menota/home. Founded 2001, part of CLARIN since 2016.
|
| 206 |
+
|
| 207 |
+
<a id="ref-eae"></a>[20] The Arnamagnæan Institute, Copenhagen. *Editiones Arnamagnæanæ Electronicæ (EAE)*. https://eae.ku.dk/
|
| 208 |
+
|
| 209 |
+
<a id="ref-flores"></a>[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
|
| 210 |
+
|
| 211 |
+
<a id="ref-italpal"></a>[22] Magni, I., Markey, L., Signorini, M. *Italian Paleography* (2019). https://italian.newberry.t-pen.org/
|
| 212 |
+
|
| 213 |
+
<a id="ref-cltk"></a>[23] *Classical Language Toolkit (CLTK): lat_text_latin_library*. https://github.com/cltk/lat_text_latin_library. Texts in the public domain.
|
| 214 |
+
|
| 215 |
+
<a id="ref-medlat"></a>[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
|
| 216 |
+
|
| 217 |
+
<a id="ref-kochanowski"></a>[25] Kochanowski, J. *Works of Jan Kochanowski*. Wikiźródła (Polish Wikisource). https://pl.wikisource.org/wiki/Autor:Jan_Kochanowski
|
| 218 |
+
|
| 219 |
+
---
|
| 220 |
+
|
| 221 |
+
## Citation
|
| 222 |
+
|
| 223 |
+
If you use this dataset in your research, please cite:
|
| 224 |
+
|
| 225 |
+
```bibtex
|
| 226 |
+
@unpublished{moins:hal-05600991,
|
| 227 |
+
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}},
|
| 228 |
+
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},
|
| 229 |
+
URL = {https://enc.hal.science/hal-05600991},
|
| 230 |
+
NOTE = {working paper or preprint},
|
| 231 |
+
YEAR = {2026},
|
| 232 |
+
MONTH = Apr,
|
| 233 |
+
HAL_ID = {hal-05600991},
|
| 234 |
+
HAL_VERSION = {v1},
|
| 235 |
+
}
|
| 236 |
+
```
|
| 237 |
+
|
| 238 |
+
---
|
| 239 |
+
|
| 240 |
+
## Funding
|
| 241 |
+
|
| 242 |
+
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.
|
| 243 |
+
|
| 244 |
+
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.
|
| 245 |
+
|
| 246 |
+
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»).
|
| 247 |
+
|
| 248 |
+
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.
|
| 249 |
+
|
| 250 |
+
This work was granted access to the HPC resources of IDRIS under the allocation 2026-AD011015914R1 made by GENCI.
|