caselawnet.
Caselawnet constructs citation networks from collections of Dutch case law.
CaseLawAnalytics
This repository contains code for the case law query app: an application to query Dutch law cases and extract a network to use in the case law visualization app.
If you use this software, please acknowledge by citing the DOI.
Prerequisites: * Python 3
The python package
The python package caselawnet
provides the following main functionalities:
* Search the rechtspraak.nl api to retrieve
relevant law cases.
* Retrieve metadata from rechtspraak.nl for a
list of cases (given their ECLI identifier)
* Retrieve metadata from HuDOC to retrieve
relevant law cases.
* Retrieve references between cases from LiDO). This requieres a valid login for the LiDO services.
* Calculate network statistics and create json file that can be used in the
case law visualization app.
To install caselawnet
, clone the repository and run in the root of the repository:
pip install .
To run tests:
pytest tests/
The web app
The web application provides a graphical user interface to the caselawnet package.
Copy the settings file:
cp settings.cfg_dist settings.cfg
If necessary, configure attributes in the config file, such as database.
To run the web app:
export FLASK_APP=caselawnet_webapp.py
and run the app:
flask run
The app runs much quicker if it connects to a database with the parsed cases.
Setting up a database
The application works with SQLAlchemy. You can use any database as a backend for this. If using MySQL, the python package mysql=connector-python needs to be installed.
The script fill_database.py can be used to initiate and fill the database. Adjust the settings within this file to point to the database (this should be the same location as defined in settings.cfg
), and to the location of a downloaded version of the Rechtspraak.nl data collection.