Segmentation and Processing of German Court Decisions from Open Legal Data
Harshil Darji, Martin Heckelmann, Christina Kratsch, Gerard de Melo
TL;DR
The paper tackles inconsistent formatting in German Open Legal Data decision texts by building a rule-based extraction pipeline that segments decisions into Tenor, Tatbestand, and Entscheidungsgründe and separately extracts Rechtsmittelbelehrung. It validates reliability with a statistically representative sample (n=384), achieving about 97.4% correct segmentation and a tight confidence interval. The authors publish a cleaned 251,038-decision JSONL corpus with section annotations and legal references, accessible via Hugging Face, and demonstrate its use in a retrieval-augmented generation (RAG) system. This work enables more accurate, section-aware retrieval and analysis in the German legal domain, with planned extensions to cover drafting variations and additional decisions.
Abstract
The availability of structured legal data is important for advancing Natural Language Processing (NLP) techniques for the German legal system. One of the most widely used datasets, Open Legal Data, provides a large-scale collection of German court decisions. While the metadata in this raw dataset is consistently structured, the decision texts themselves are inconsistently formatted and often lack clearly marked sections. Reliable separation of these sections is important not only for rhetorical role classification but also for downstream tasks such as retrieval and citation analysis. In this work, we introduce a cleaned and sectioned dataset of 251,038 German court decisions derived from the official Open Legal Data dataset. We systematically separated three important sections in German court decisions, namely Tenor (operative part of the decision), Tatbestand (facts of the case), and Entscheidungsgründe (judicial reasoning), which are often inconsistently represented in the original dataset. To ensure the reliability of our extraction process, we used Cochran's formula with a 95% confidence level and a 5% margin of error to draw a statistically representative random sample of 384 cases, and manually verified that all three sections were correctly identified. We also extracted the Rechtsmittelbelehrung (appeal notice) as a separate field, since it is a procedural instruction and not part of the decision itself. The resulting corpus is publicly available in the JSONL format, making it an accessible resource for further research on the German legal system.
