Blackstone — Legal NER & Text Categorizer
spaCy-based NLP pipeline for English legal text: named entity recognition for cases, legislation, and provisions, plus text categorization.
Blackstone — Legal NER & Text Categorizer
Blackstone is an Apache-licensed spaCy NLP pipeline trained on the Incorporated Council of Law Reporting for England and Wales (ICLR&D) corpus. It provides named entity recognition purpose-built for legal text — identifying cases, legislation, provisions, instruments, neutral citations, and court references. It also ships a text categorizer for classifying sentence types in legal documents (issue, ratio, legal test, etc.).
Key Features
- Custom NER for legal entities:
CASENAME,CITATION,LEGISLATION,PROVISION,INSTRUMENT,COURT - Sentence-level text categorizer trained on case law
- Span-level co-reference resolution for legal citations
- Abbreviation detection for statute shorthand
- Built on spaCy 3 — integrates with any spaCy pipeline
Quick Start
pip install blackstone
python -m blackstone.pipeline.download
import spacy
from blackstone.pipeline.abbreviations import AbbreviationDetector
nlp = spacy.load("en_blackstone_proto")
text = "The court in Donoghue v Stevenson [1932] AC 562 held that a duty of care existed."
doc = nlp(text)
for ent in doc.ents:
print(ent.text, ent.label_)
# Donoghue v Stevenson [1932] AC 562 CASENAME
npx ai-supply add blackstone-legal-nlp
Curated mirror of the open-source Blackstone (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/blackstone-legal-nlp/check). Click a policy:
Consume Blackstone — Legal NER & Text Categorizer programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/blackstone-legal-nlp
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/blackstone-legal-nlp/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add blackstone-legal-nlp
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/blackstone-legal-nlp/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "blackstone-legal-nlp" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.