-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
fix(extract_from_text): now returns a plain citation string #1298
Conversation
Solves #1297 We will use eyecite on Courtlistener's site to parse and validate the citation string
Spent some time thinking if the "Citation" value should be a string or a dict... {
"Citation": {"citation" : "2023 VT 3"}
} or {
"Citation": "2023 VT 3"
} I couldn't really answer, maybe you have an opinion? |
is there a corresponding PR in CL to review? |
Just up here |
""" | ||
metadata = {} | ||
regex = r"(?P<volume>20\d{2})\s(?P<reporter>ND)\s(?P<page>\d+)" | ||
regex = r"20\d{2}\sND\s\d+" | ||
citation_match = re.search(regex, scraped_text[:1000]) | ||
|
||
if citation_match: | ||
# type 8 is a neutral citation in Courtlistener | ||
metadata["Citation"] = {**citation_match.groupdict(), "type": 8} | ||
metadata["Citation"] = citation_match.group(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like ND doesnt need this anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw that ND has changed; it will require further changes to clean the case name
Do you mind if I merge this and do the nd
changes in a different branch?
Solves #1297
We will use eyecite on Courtlistener's site to parse and validate the citation string