Contract · Legal-tech client · Data engineer · 2026–now

Court judgments, turned into data a legal product runs on.

In numbers

23steps, run from one config
955judgments in the first full volume
39fields per case

The situation

On this contract I work on Pakistani case law. The raw material is years of scraped judgments: long blocks of text, inconsistent names, courts that are really section labels, and fields that are simply empty.

The job

Turn that into clean, structured data, without ever losing or hiding anything.

What I shipped

  1. 01
    One pipeline instead of a pile of notebooks. Twenty-three steps, run from a single config file, that pull out judges, parties, outcomes, case types, the laws cited and the courts.
  2. 02
    A local LLM where rules can't decide. Rules first; a model only where the text genuinely needs reading. Then every value is cleaned into one standard form.
  3. 03
    Nothing lost or hidden. The raw data is never touched. Every step works on its own copy and writes a before/after report of what it changed, filled or emptied.
  4. 04
    A hand-check loop. The calls no code can make go to a person once. The answers are saved and applied on every run after that.

Stack

PythonSQLiteLocal LLMs (Ollama)YAML configpytest