Bundesrecht: An Open Library and Corpus for German Statutory Reference Processing
This paper introduces **bundesrecht**, an open-source Python library and structured corpus that provides the first end-to-end pipeline for parsing, normalizing, and resolving German statutory references from raw citation strings to specific legal provisions.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to read a complex German legal document. You come across a sentence like: "See § 312 i.V.m. § 355 BGB."
To a human lawyer, this is a clear instruction: "Look at paragraph 312 of the Civil Code, and also look at paragraph 355." But to a computer, this looks like a jumbled mess of symbols, abbreviations, and hidden connections. The computer doesn't know that "i.V.m." means "in conjunction with," or that the second paragraph number actually belongs to the same law as the first.
This paper introduces bundesrecht, a new open-source toolkit designed to be the ultimate translator and librarian for German laws. It helps computers understand, organize, and find specific parts of German statutes, just like a human expert would.
Here is how it works, broken down into three simple steps using a library analogy:
1. The Librarian (The Parser)
Imagine a messy pile of books where the spines have been scribbled on with different handwriting. Some say "Book A, Chapter 1," while others say "A-1" or "Book A, Ch. 1, Sec. 2."
The Parser is the librarian who picks up a scribbled note (the raw citation string) and figures out exactly what it means. It breaks the note down into its parts:
- Which law is it? (e.g., BGB, the Civil Code)
- Which paragraph? (e.g., § 312)
- Which sub-section? (e.g., Paragraph 2, Number 1)
It turns a confusing string of text into a neat, structured card that says: "Law: BGB, Paragraph: 312, Sub-part: 2, Item: 1."
2. The Standardizer (The Normalizer)
Now imagine that same library, but the books are written in many different styles. One book says "Paragraph 12 to 15," another says "§§ 12–15," and a third says "See 12, 13, 14, and 15." A computer can't easily tell these are all the same thing.
The Normalizer is the editor who rewrites all these different styles into one standard, "canonical" format.
- If you say "Paragraphs 12 through 15," the normalizer splits that into four separate, clear instructions: "Look at 12," "Look at 13," "Look at 14," and "Look at 15."
- If you say "Paragraph 312 and the one after it" (using the abbreviation f.), it expands that to "Paragraph 312 and Paragraph 313."
This ensures that no matter how the law was written in the original document, the computer gets a clean, consistent list of exactly which parts to look at.
3. The Finder (The Resolver)
Finally, imagine you have a massive, digital library containing the full text of every German law, organized down to the tiniest sub-clause (like a specific letter or number within a paragraph).
The Resolver takes your clean, standardized list and goes to the library to fetch the actual text.
- If you ask for "Paragraph 312, Section 2, Item 7," the Resolver doesn't just give you the whole paragraph. It digs deep and hands you only that specific item.
- If the exact item doesn't exist (maybe the law only goes up to Item 5), the Resolver is smart enough to say, "I couldn't find Item 7, but here is the closest match I have, and I'll tell you that I stopped at Item 5."
Why is this a big deal?
Before this tool, computers could either:
- Find the citation in a text but not understand its structure.
- Look up a law if you gave them a perfect, pre-formatted address.
But they couldn't handle the messy, real-world way lawyers write citations (with abbreviations, ranges, and combined references). bundesrecht is the first open tool that does the whole job: it takes the messy citation, cleans it up, breaks it down, and finds the exact text in the law.
How well does it work?
The authors tested their tool on nearly 3,000 real legal citations.
- Accuracy: It got the structure right more than 98% of the time for most parts of the law.
- Grouping: It was much better at realizing that "§ 12–15" and "§ 12, 13, 14, 15" are the same thing compared to just doing a simple text search.
In short, bundesrecht is like giving a computer a pair of glasses and a map, allowing it to navigate the dense, complex forest of German statutory law with the same ease a human lawyer does. It is available for anyone to use right now.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.