Home

Awesome

Build Status DOI

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:

The python package

The python package caselawnet provides the following main functionalities:

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.