openlegaldata / README.md
harshildarji's picture
Update README.md
f147305 verified
---
license: mit
task_categories:
- text-classification
- text-generation
language:
- de
tags:
- legal
pretty_name: Clean Open Legal Data
size_categories:
- 100K<n<1M
configs:
- config_name: cases
data_files:
- split: main
path: data/cases.jsonl.gz
---
<h1 align="center">Clean Open Legal Data</h1>
<h4 align="center">
<p>
<a href=#overview>Overview</a> |
<a href=#dataset-structure>Dataset Structure</a> |
<a href=#key-fields>Key Fields</a> |
<a href=#example-entry>Example Entry</a> |
<a href=#using-the-dataset-with-python>Using the Dataset with Python</a> |
<a href=#citation>Citation</a> |
<a href=#license>License</a>
<p>
</h4>
## Overview
This dataset is a comprehensive collection of open legal case records in JSONL format. It comprises **251,038** cases extracted and processed from the [Open Legal Data dump](https://static.openlegaldata.io/dumps/de/2022-10-18/) (as of _2022-10-18_). The dataset is designed for legal research, data science, and natural language processing applications. Each decision is segmented into three main sections of judicial writing: _Tenor_, _Tatbestand_, and _Entscheidungsgründe_. In addition, the _Rechtsmittelbelehrung_ is extracted as a separate field, since it is part of the published decision but not considered a substantive section of it. In references, law references and case references are also separated, as shown in the [example entry](#example-entry).
## Dataset Structure
```
├── README.md
├── data
│   └── cases.jsonl.gz
└── problematic_case_slugs.txt
```
- **Language:** German
- **Format:** JSONL
- **Total Cases:** 251,038
## Key Fields
- **id:** Unique identifier for the record.
- **file_number:** Identifier for the case (e.g., `"1 A 2639/20"`).
- **slug:** URL-friendly unique identifier (e.g., `"ovgnrw-2022-03-25-1-a-263920"`).
- **ecli:** European Case Law Identifier.
- **date:** Date of the decision in `YYYY-MM-DD` format.
- **court:** JSON object with court details (e.g., _name_, _city_, _state_, _jurisdiction_).
- **type:** Type of legal decision (e.g., "Beschluss").
- **tenor:** List of summary statements of the decision.
- **tatbestand:** List of factual background details.
- **entscheidungsgründe:** Detailed decision reasons.
- **references:** Contains references to laws and related cases.
- **rechtsmittelbelehrung:** Instructions on how and when to appeal a legal decision.
## Example Entry
Below is an example entry from the JSONL file:
```json
{
"id": 344319,
"file_number": "1 A 2639/20",
"slug": "ovgnrw-2022-03-25-1-a-263920",
"ecli": "ECLI:DE:OVGNRW:2022:0325.1A2639.20.00",
"date": "2022-03-25",
"court": {
"id": 823,
"name": "Oberverwaltungsgericht Nordrhein-Westfalen",
"slug": "ovgnrw",
"city": "Unspecified",
"state": "Nordrhein-Westfalen",
"jurisdiction": "Verwaltungsgerichtsbarkeit",
"level_of_appeal": null
},
"type": "Beschluss",
"tenor": [
"Der Antrag wird abgelehnt.",
"..."
],
"tatbestand": [],
"entscheidungsgründe": [
"Der Antrag des Klägers auf Zulassung der Berufung hat keinen Erfolg.",
"..."
],
"references": {
"law": [
"§ 27a Abs. 3 Satz 1 2. Halbsatz SGB V",
"..."
],
"case": [
"1 A 2251/16",
"..."
]
},
"rechtsmittelbelehrung": []
}
```
## Using the Dataset with Python
Below is an example of how to load and explore the dataset using Python with the [🤗 Datasets](https://huggingface.co/docs/hub/datasets-usage) library:
```python
import json
from datasets import load_dataset
# Load cases
cases = load_dataset("harshildarji/openlegaldata", "cases", split="main")
# Total cases
print(len(cases))
# View first case
print(json.dumps(cases[0], indent=4, default=str, ensure_ascii=False))
```
## Citation
Please consider citing our [paper](https://arxiv.org/abs/2601.01449) when using the dataset:
```bibtex
@inbook{Darji_2025,
title={Segmentation and Processing of German Court Decisions from Open Legal Data},
ISBN={9781643686387},
ISSN={1879-8314},
url={http://dx.doi.org/10.3233/FAIA251597},
DOI={10.3233/faia251597},
booktitle={Legal Knowledge and Information Systems},
publisher={IOS Press},
author={Darji, Harshil and Heckelmann, Martin and Kratsch, Christina and de Melo, Gerard},
year={2025},
month=dec
}
```
## License
This dataset is released under the MIT license, the same license as the [Open Legal Data platform](https://github.com/openlegaldata/oldp).