eyecite version: 2.7.8 · Python 3.14 · AhocorasickTokenizer
When several case citations appear near each other, FullCaseCitation.metadata can pick up the previous citation's caption parties or year parenthetical instead of its own.
Repro 1 — party name from the previous sentence
from eyecite import get_citations
from eyecite.tokenizers import AhocorasickTokenizer
text = (
'The court in Smith v. Jones, 347 U.S. 999 (1954), held that '
'"schools must serve pizza." Smith v. Jones, 347 U.S. 999 (1954). '
'Compare Brown v. Board of Education, 347 U.S. 483 (1954).'
)
for c in get_citations(text, tokenizer=AhocorasickTokenizer()):
print(c.corrected_citation(), repr(c.metadata.plaintiff), repr(c.metadata.defendant))
Output:
347 U.S. 999 'Smith' 'Jones'
347 U.S. 999 'Smith' 'Jones'
347 U.S. 483 '' 'Jones' # <- Brown's cite, defendant from the prior sentence
The third citation is captioned "Brown v. Board of Education" in the text, but its metadata reports defendant='Jones' (and plaintiff='') from the preceding case. full_span() for that citation also stretches back across the sentence boundary.
Repro 2 — year from the previous citation's parenthetical
text = "Miranda v. Arizona, 347 U.S. 483 (1990). NLRB v. IBEW, 346 U.S. 464 (1953)."
for c in get_citations(text, tokenizer=AhocorasickTokenizer()):
print(c.corrected_citation(), c.metadata.year)
Output:
347 U.S. 483 1990
346 U.S. 464 1990 # <- text says (1953) immediately after this cite
The second citation's own (1953) parenthetical is ignored and it inherits 1990 from the first citation.
Why it matters
We use party/year metadata to cross-check citations in AI-generated legal text (wrong-case-name and wrong-year detection). Mis-associated metadata makes a correctly cited case look mis-attributed — we currently work around it by re-anchoring both fields against the text window adjacent to each citation's span(), but a fix at the extraction layer would benefit everyone consuming metadata.
Happy to provide more cases or test against a branch. Thanks for eyecite — it's load-bearing for us.
eyecite version: 2.7.8 · Python 3.14 · AhocorasickTokenizer
When several case citations appear near each other,
FullCaseCitation.metadatacan pick up the previous citation's caption parties or year parenthetical instead of its own.Repro 1 — party name from the previous sentence
Output:
The third citation is captioned "Brown v. Board of Education" in the text, but its metadata reports
defendant='Jones'(andplaintiff='') from the preceding case.full_span()for that citation also stretches back across the sentence boundary.Repro 2 — year from the previous citation's parenthetical
Output:
The second citation's own
(1953)parenthetical is ignored and it inherits1990from the first citation.Why it matters
We use party/year metadata to cross-check citations in AI-generated legal text (wrong-case-name and wrong-year detection). Mis-associated metadata makes a correctly cited case look mis-attributed — we currently work around it by re-anchoring both fields against the text window adjacent to each citation's
span(), but a fix at the extraction layer would benefit everyone consumingmetadata.Happy to provide more cases or test against a branch. Thanks for eyecite — it's load-bearing for us.