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

Find name-only ReferenceCitations #198

Open
grossir opened this issue Jan 30, 2025 · 0 comments
Open

Find name-only ReferenceCitations #198

grossir opened this issue Jan 30, 2025 · 0 comments
Assignees

Comments

@grossir
Copy link
Contributor

grossir commented Jan 30, 2025

Finding ReferenceCitations depend on preceding FullCaseCitations. Currently, we find them using either the defendant or the plaintiff as identified on the FullCaseCitation; and we require a pincite.

eyecite/eyecite/find.py

Lines 157 to 167 in abfc7f7

regexes = [
rf"(?P<{key}>{re.escape(value)})"
for key in ["plaintiff", "defendant"]
if (value := getattr(citation.metadata, key, None))
and is_valid_name(value)
]
if not regexes:
return []
pin_cite_re = (
rf"\b(?:{'|'.join(regexes)})\s+at\s+(?P<pin_cite>\d{{1,5}})\b"
)

To find name-only ReferenceCitations, without pincites, we need to account for a different structure. I think this is easiest for HTML / XML opinions, since the intention of referencing is made explicit by <i> or <em> style tags. Other seemingly obvious structure is the "In $name,". But, see the Halper references that do not conform to in Halper. And see the blue highlight for a case where the party names was not supposed to be a reference

Image

So, I think we should start looking for this kind of citations on HTML / XML documents only, and using the structured text itself, not a cleaned text. This second round of citation finding may benefit also from using the resolved objects metadata #199

@grossir grossir moved this to Waiting on Feedback in Case Law Sprint Jan 30, 2025
@grossir grossir self-assigned this Jan 30, 2025
@grossir grossir moved this from Waiting on Feedback to In progress in Case Law Sprint Jan 30, 2025
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