Bundesrecht: An Open Library and Corpus for German Statutory Reference Processing
Paper · 2026 · Harshil Darji, Martin Heckelmann, Christina Kratsch et al.
Summary
German legal texts cite statutes in dense and highly variable ways. Abbreviations such as i.V.m., §§ ranges, several targets in one expression, and omitted context that later parts must inherit all make these citations hard for machines to follow down to the exact provision. Earlier tools either locate citations in documents or fetch statute text when the citation is already precise. Nothing open covered the whole path in between. The authors release bundesrecht, an open resource with two parts:
- a Python library that parses a citation string into a structured object, rewrites it into one or more canonical references, and resolves each one against the law;
- a JSONL corpus built from Gesetze im Internet that keeps each statute's internal hierarchy down to Unterbuchstabe.
On 2,944 manually annotated references, field-level exact match exceeds 98.6%. A deduplication test on citation variants observed in court decisions shows that canonical forms group equivalent citations far better than raw strings. This gives legal retrieval, QA, and RAG systems a comparable and linkable representation of statutory references.
Key points
- The library is on PyPI as
bundesrechtunder the MIT License. The corpus is on Hugging Face (harshildarji/bundesrecht) under ODbL and is derived from official XML. - Evaluation uses 2,944 references from the German legal reference annotations dataset (Darji et al., 2023). Strict exact-match is above 98.6% for every field. Micro IE F1 ranges from 80.0% for Buchstabe, which has few instances, to 99.6% for Artikel.
- In the deduplication experiment, precision is 1.0 by construction. The reported F1 is roughly 0.4% for raw-string matching versus 99.5% for normalized references.
- When an exact lower-level unit is missing, the resolver returns the nearest available provision and states which level it actually reached.
- Known limitations:
- Tables are flattened to plain text, losing row and column boundaries. Of all section objects, 4.9% contain tables; among non-empty content blocks the share is 1.9%.
- The corpus is a single snapshot with no historical versions of provisions.
Interesting ideas
- I1. Parsing, normalization, and resolution are kept as independent steps, so a user can parse without loading the corpus or load it once for many lookups; this keeps each failure traceable to one stage.
- I2. One compact expression is expanded into several explicit targets, with later fragments inheriting missing parts such as the law name or Paragraph from earlier ones; this turns implicit sharing into explicit units.
- I3. Resolution degrades gracefully: rather than failing, it returns the deepest matching level and reports that depth, which is useful when partial answers still carry value.
- I4. A grouping task is scored by how well canonical keys merge known surface variants, with precision fixed at 1 by construction, and silver labels are built only from simple, high-confidence cases.
- I5. The corpus preserves the full nested hierarchy instead of flat text, because two references sharing a top-level unit can point to different content lower down.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (world): Linking text mentions to WordNet/Wikidata entries could be split the same way, as structured mention, then canonical key, then ontology lookup, so every link has an explainable trail.
- I2 (frames): The same inheritance logic fits coordination and ellipsis ("gave Tom a pen and Ann a book"), producing one complete frame per conjunct with the shared verb and agent filled in.
- I3 (world): Entity or concept grounding could return the most specific matching ontology node plus a "resolved depth" flag, letting the answer stage judge how confident it should be.
- I4 (learn): Lemma or entity normalization could be evaluated by recall of merging verified variant pairs, with silver pairs drawn only from unambiguous examples so they act as a trustworthy control.
- I5 (world): Knowledge sources such as recipes, rules, or school texts could be stored as nested units so that references to "step 2, point b" resolve to exact content rather than a whole document.
Institutions
Fields, topics and concepts
📚 Shelves 6The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksSocial Sciences · 1,772 worksPolitical Science and International Relations · 182 works
🧭 Topics 1Research subjects and languages the work is about.Legal AI · 134 works
Cite
Cite as Harshil Darji, Martin Heckelmann, Christina Kratsch and Gerard de Melo. 2026. Bundesrecht: An Open Library and Corpus for German Statutory Reference Processing. arXiv:2605.31338.
@misc{darji2026bundesrecht,
title = {{Bundesrecht: An Open Library and Corpus for German Statutory Reference Processing}},
author = {Harshil Darji, Martin Heckelmann, Christina Kratsch and Gerard {de Melo}},
year = {2026},
doi = {10.48550/arxiv.2605.31338},
eprint = {2605.31338},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2605.31338}
}References
- Marco Wrzalik and Dirk Krechel. 2021. Gerdalir: A german dataset for legal information retrieval. In Proceedings of the natural legal language processing workshop 2021, pages 123–128. find
- Morayo Adedjouma, Mehrdad Sabetzadeh, and Lionel C Briand. 2014. Automated detection and resolution of legal cross references: Approach and a study of luxembourg’s legislation. In 2014 IEEE 22nd International Requirements Engineering Conference (RE), pages 63–72. IEEE. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/darji-2026-bundesrecht-open-library-corpus-german/