Extracting RDF data from legal decisions.
This project belongs to a research program aimed at extracting structured data from legal decisions issued by the French Competition Authority ("Autorité de la concurrence"), presented in the following venue:
"Information Extraction for the Analysis of the French Competition Authority's Decisions Using Machine Learning" by Arnold Vialfont and Tommaso Bianco. Econom'IA Workshop 2024.
Using an agent-based workflow, this program:
- Loads a text and an ontology
- Uses LLM to extract RDF data that follows the given ontology
- Uses LLM to verify and edit the extracted RDF, also using programmatic verification
- Writes the final RDF data to a file
First, install the environment:
poetry installThen, create a .env file with API keys for LLM providers the code will use.
Finally, run the main script with:
poetry run python ./src/main.pyNote that we use dependencies only compatible with python 3.11, so that you may need to create and activate a dedicated environment to run these two commands.