Skip to content

Issue 242 - Fix court detection when parenthetical includes date #243

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattdahl
Copy link
Contributor

@mattdahl mattdahl commented Apr 6, 2025

As described in #242, there is currently a problem in detecting the court in a full citation when the parenthetical includes the specific date on which the opinion was issued, e.g., (C.D. Cal. Feb. 9, 2015).

The problem is that we currently treat everything before the year as a potential court string, so C.D. Cal. Feb. 9 in the example above. This causes the court lookup in helpers.get_court_by_paren() to fail.

This PR fixes this by modifying the POST_FULL_CITATION_REGEX regex to include capturing groups for potential months and days. If these are present, we capture them so the <court> group remains pristine (i.e., only C.D. Cal.). If they are not present, the behavior should be the same as it currently is.

@flooie flooie self-assigned this Apr 7, 2025
@flooie
Copy link
Contributor

flooie commented Apr 7, 2025

Thanks @mattdahl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: May
Development

Successfully merging this pull request may close these issues.

2 participants