Segmentation and Processing of German Court Decisions from Open Legal Data
Paper · 2025 · Harshil Darji, Martin Heckelmann, Christina Kratsch et al.
Summary
The Open Legal Data dump of German court decisions has tidy metadata, but the decision bodies are stored as irregular HTML in which the standard parts of a ruling are often not marked. The authors build a cleaned corpus of 251,038 decisions from the 2022-10-18 dump. Each text is divided into Tenor (operative ruling), Tatbestand (facts) and Entscheidungsgründe (reasoning). The Rechtsmittelbelehrung (appeal instructions) goes into its own field.
The pipeline is entirely rule-based:
- visible HTML elements are flattened and whitespace is normalized;
- court location metadata is resolved through the Open Legal Data API;
- section starts are found by exact full-line header matches, including letter-spaced spellings;
- for Beschlüsse, a numbered Gründe section is mapped onto facts and reasoning;
- statute and case citations are attached with an existing extraction tool.
The authors sized a manual check with Cochran's formula and reviewed 384 randomly drawn decisions; 97.40% were segmented correctly. The JSONL release on Hugging Face can support retrieval, citation analysis, rhetorical role classification and section-aware RAG.
Key points
- The corpus has 251,038 decisions, published as
harshildarji/openlegaldata(JSONL). Each record holds normalized metadata, sectioned text and extracted law/case references. - Header detection works as follows:
- It uses a fixed vocabulary (tenor, tatbestand, entscheidungsgründe, gründe).
- Each term is matched by two case-insensitive full-line regex forms, one compact and one spaced-letter.
- Text before the first header defaults to Tenor.
- In Beschlüsse, Gründe I maps to Tatbestand and Gründe II to Entscheidungsgründe; an undivided Gründe counts entirely as reasoning.
- The verification sample size comes from Cochran's formula with p=0.5, e=0.05 and Z=1.96 (n₀≈384.16), with finite population correction (≈383.58), rounded up to 384. A decision counted as correct only if its sections did not overlap.
- 97.40% of the sample was correct, with a 95% CI of 95.8%–98.9% for the full corpus. The errors came mostly from rare HTML formatting quirks.
- Section coverage:
- Tenor appears in 87.7% of decisions, Tatbestand in 65.4% and Entscheidungsgründe in 95.1%.
- All three sections appear in 57.5%, Tenor plus reasoning only in 25.4%, and Tenor alone in 4.5%.
- The appeal notice appears in 8,335 decisions (3.32%), and 176 decisions have empty content.
Interesting ideas
- I1. Instead of eyeballing a few outputs, the authors check a rule-based pipeline by drawing a statistically sized random sample, judging each item pass/fail by a strict criterion, and reporting a confidence interval.
- I2. Variant document layouts (Urteil vs. Beschluss, Gründe with or without I/II) are mapped onto one canonical schema, with an explicit fallback rule when the subdivision is missing.
- I3. Procedural boilerplate (the appeal notice) is stored apart from the substantive content, so it does not pollute downstream analysis of the decision itself.
- I4. The section a statement sits in changes what it means: a statute cited in the reasoning carries different weight from one in the operative part, and mixing facts with arguments causes false retrieval matches.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (learn): Silver trees or self-induced repair rules could be audited on ~384 random items with a binary criterion, so each reported accuracy carries a real error bar.
- I2 (tree): The same pattern suits UD dialect conversion, where each source convention gets a documented mapping plus a stated default for ambiguous cases.
- I3 (frames): Meta-text such as instructions, morals or editorial notes could be tagged before frame extraction, so no who-did-what frames are built from it.
- I4 (world): Each world entry could record which part of the text it came from, letting the world model separate narrated facts from claims or arguments when answering.
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 2Research subjects and languages the work is about.Reasoning · 1,426 worksLegal AI · 134 works
Cite
Cite as Harshil Darji, Martin Heckelmann, Christina Kratsch and Gerard de Melo. 2025. Segmentation and Processing of German Court Decisions from Open Legal Data. arXiv:2601.01449 · Legal Knowledge and Information Systems, Frontiers in Artificial Intelligence and Applications, Vol. 416, IOS Press, 2025, pp. 276–281.
@misc{darji2025segmentation,
title = {{Segmentation and Processing of German Court Decisions from Open Legal Data}},
author = {Harshil Darji, Martin Heckelmann, Christina Kratsch and Gerard {de Melo}},
year = {2025},
doi = {10.3233/faia251597},
eprint = {2601.01449},
archivePrefix = {arXiv},
url = {https://doi.org/10.3233/faia251597}
}References
- Ostendorff M, Blume T, Ostendorff S. Towards an open platform for legal information. In: Proceedings of the ACM/IEEE Joint Conference on Digital Libraries in 2020; 2020. p. 385-8. find
- Wrzalik M, Krechel D. GerDaLIR: A German dataset for legal information retrieval. In: Proceedings of the natural legal language processing workshop 2021; 2021. p. 123-8. find
- Darji H, Mitrović J, Granitzer M. Exploring Semantic Similarity Between German Legal Texts and Referred Laws. In: International Joint Conference on Knowledge Discovery, Knowledge Engineering, and Knowledge Management. Springer; 2021. p. 37-50. find
- Darji H, Mitrović J, Granitzer M. Challenges and considerations in annotating legal data: A comprehensive overview. arXiv preprint arXiv:240717503. 2024. find
- Ma Y, Wu Y, Ai Q, Liu Y, Shao Y, Zhang M, et al. Incorporating structural information into legal case retrieval. ACM Transactions on Information Systems. 2023;42(2):1-28. find
- Santosh T, Isaia A, Hong S, Grabmair M. Hiculr: Hierarchical curriculum learning for rhetorical role labeling of legal documents. arXiv preprint arXiv:240918647. 2024. find
- Bambroo P, Adhikary S, Bhattacharya P, Chakraborty A, Ghosh S, Ghosh K. MARRO: multi-headed attention for rhetorical role labeling in legal documents. Artificial Intelligence and Law. 2025:1-30. find
- Glaser I, Moser S, Matthes F. Improving Legal Information Retrieval: Metadata Extraction and Segmentation of German Court Rulings. In: KDIR; 2021. p. 282-91. find
- Urchs S, Mitrović J, Granitzer M. Towards classifying parts of german legal writing styles in german legal judgments. In: 2020 10th International Conference on Advanced Computer Information Technologies (ACIT). IEEE; 2020. p. 451-4. find
- Urchs S, Mitrovic J, Granitzer M. Design and Implementation of German Legal Decision Corpora. In: ICAART (2); 2021. p. 515-21. find
- Cochran WG. Sampling techniques. john wiley & sons; 1977. find
- Glaser I, Moser S, Matthes F. Summarization of German court rulings. In: Proceedings of the Natural Legal Language Processing Workshop 2021; 2021. p. 180-9. find
- Darji H, Mitrović J, Granitzer M. A dataset of German legal reference annotations. In: Proceedings of the Nineteenth International Conference on Artificial Intelligence and Law; 2023. p. 392-6. find
- Heckelmann M. Smart Contracts. Neue Juristische Wochenschrift (NJW). 2018:504-9. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/darji-2026-segmentation-processing-german-court-decisions/