Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Citation model's full span and regexes to account for ReferenceCitation overlaps #209

Open
grossir opened this issue Feb 11, 2025 · 0 comments
Assignees

Comments

@grossir
Copy link
Contributor

grossir commented Feb 11, 2025

With the introduction of ReferenceCitations we noticed they sometimes overlapped with other citation models.

Given that References may be a standalone name As seen in Roe, ... or a name pincite combination As seen in Roe at 223, a reference extraction that does not take into account other citation models may incorrectly extract references that are actually part of the fuller citation models.

Currently, this is managed by eyecite.helpers.filter_citations, but we have been running into bugs due to not having correct full span calculations; or due to having incomplete extractors

overlap with supra

From Example 1

  • overlap with supra citation Twombly, supra, at 553-554

Image

A Reference would be found inside of the Supra due to incomplete full span calculation:

eyecite/eyecite/find.py

Lines 313 to 324 in 32ee756

# Return SupraCitation
return SupraCitation(
cast(SupraToken, words[index]),
index,
span_end=span_end,
metadata={
"antecedent_guess": antecedent_guess,
"pin_cite": pin_cite,
"parenthetical": parenthetical,
"volume": volume,
},
)

overlap with short case citation

From Example 1

  • overlap with ShortCaseCitation Twombly, 550 U. S. ( I think this has been solved recently)

overlap with single-name and pincite full case citation

Example 2:

  • Nobelman at 332, 113 S.Ct. 2106 is actually a pincited case citation (?); currently we would identify it as a Reference followed by: a full citation or maybe a short case citation

Image

overlap with single name full case citation

From example 1
Image



Not strictly related to References, but to parallel citations; this should probably be split into another issue; but I am pointing it here to be added as test cases that we will know will fail

Example

  • State v. Howard, supra 128-129, 539 A.2d 1203. is a single citation that lists all the parallels, but our system will recognize it as a SupraCitation followed by a CaseCitation

Image

On the same example, something similar happens with an IdCitation and parallel citations

Image

@grossir grossir self-assigned this Feb 12, 2025
@grossir grossir moved this to In progress in Case Law Sprint Feb 12, 2025
grossir added a commit that referenced this issue Feb 13, 2025
Solves #209

- add test cases for full case citation with antecedent and no pincite
- fix span calculation on add_pre_citation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant