CODE / PYTHON / LLM
Parsing legal argument
A Python application that uses large language models to detect, classify, and reconstruct the language structures through which legal argument is made, across large scholarly corpora.
- v7
- Current line
- Python
- Runtime
- LLMs
- Methods
- 883
- EJIL book corpus
Architecture
- 01
Detection
- 02
Clustering
- 03
Argument mapping
- 04
Typology
- 05
Classification
- 06
Analytics
What it does
Legal argument is made of recurring structures: a metaphor that turns a rule into a place, a personification that gives an institution a will, a frame that decides what counts as the dispute. This application reads those structures at corpus scale.
It is written in Python. Large language models work with classical corpus methods to find candidate structures, group related uses, and place them in the argument they serve. The result is material for close reading and for claims about a body of scholarship, not a score.
The current production line is version 7. It is built to run over collections of articles.
How a run moves
Detection finds candidates. Clustering gathers related uses. Argument mapping asks what work the structure is doing. Typology and classification sort the instances. Analytics return them in a form that can be read against the text.
Evaluation protocols run beside production runs. Reliability rules for treating a model as a coder are still being written; those drafts stay with this project until they are finished.
Corpus
883 is the count of EJIL articles used as the book corpus for Figuring International Law. The span is on that page.
Other collections processed while the application was built are not the denominator of that study. A larger public figure will be stated only with its scope.
Public code
No public repository is linked yet. When one is released, this page will carry the link, the schemas, and sample output.