This package contains coding utilities for quantitative legal studies.
The package currently consists of two modules.
quantlaw.de_extract
is an extractor for references to statutes in German legal texts.
In contrast to most other named entity recognition packages, this module not only
identifies the references but also extracts their content. This can, e.g., be used to
quantitatively analyze the structure of the law.
For example, we can extract the content of two references in the following text.
Source text:
"In den Fällen des § 111d Absatz 1 Satz 2 der Strafprozessordnung findet § 91 der Insolvenzordnung keine Anwendung."
The extracted data would be:
[[['§', '111d'], ['Abs', '1'], ['Satz', '2']]]
for the lawStPO
[[['§', '91']]]
for the lawInsO
Getting started in the documentation contains a minimal example.
quantlaw.utils
contains several utilities that are helpful to analyze the structure of
the law with BeautifulSoup
and networkx
. The documentation contains further
information about the individual usages.
Python 3.7.9 is recommended. Our package is provided via pip install quantlaw
.
It is, inter alia, used to produce the results reported in the following publication:
Daniel Martin Katz, Corinna Coupette, Janis Beckedorf, and Dirk Hartung, Complex Societies and the Growth of the Law, Sci. Rep. 10 (2020), https://doi.org/10.1038/s41598-020-73623-x
Related Repositories:
- Complex Societies and the Growth of the Law (First Publication Release)
- Legal Data Clustering (First Publication Release)
Related Data: Preprocessed Input Data for Sci. Rep. 10 (2020)
Please format the code using isort
, black
, and flake8
. A convenient option to
ensure correct formatting of the code is to
pip install pre-commit and run
pre-commit install
to add code checking and reformatting as git pre-commit hook.