Metadata-Version: 2.3
Name: corpus-judge
Version: 1.0.1
Summary: Supreme Court justice roster and opinion-writer matching
Requires-Dist: pydantic>=2.13
Requires-Dist: python-dateutil>=2.9.0.post0
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: sqlite-utils>=4.1
Requires-Dist: unidecode>=1.4
Requires-Python: >=3.14
Description-Content-Type: text/markdown

![Github CI](https://github.com/justmars/corpus-judge/actions/workflows/ci.yml/badge.svg)

# Corpus Judge

`corpus-judge` provides a curated Supreme Court justice roster plus utilities
for normalizing opinion-writer names and selecting a likely justice for a case
date. It is intended for Philippine legal-corpus ingestion, where the original
writer text should remain available as source evidence. Selection is
conservative: when the source text and active roster do not support one
justice, the result is unresolved rather than a guessed attribution.

## Quick Example

```python
from corpus_judge import CandidateJustice, load_justice_records
from sqlite_utils import Database

db = Database(":memory:")
db["justices"].insert_all(load_justice_records())

candidate = CandidateJustice(
    db=db,
    text="Justice Antonio T. Kho, Jr.",
    date_str="2023-04-03",
)
assert candidate.detail is not None
assert candidate.detail.raw_ponente == "Kho"
```

## Documentation

See the [documentation](https://justmars.github.io/corpus-judge) for the
roster schema, name-normalization rules, selection behavior, and development
commands. The [release notes](https://justmars.github.io/corpus-judge/releases/)
compare the current major release with the previously published package.

## Testing

```sh
uv sync --all-extras --dev
just check
```
