Skip to content

ShortCaseCitation.full_span now includes parentheticals#183

Draft
varun-magesh wants to merge 1 commit intofreelawproject:mainfrom
lexeme-dev:full_span
Draft

ShortCaseCitation.full_span now includes parentheticals#183
varun-magesh wants to merge 1 commit intofreelawproject:mainfrom
lexeme-dev:full_span

Conversation

@varun-magesh
Copy link

@varun-magesh varun-magesh commented Aug 26, 2024

Previously, only FullCaseCitation objects included parentheticals and antecedent text in the full_span method.

For example, in this ShortCaseCitation:

>>> test_sentence = "See Sargent, 75 F.3d at 89 (explaining that blah blah blah)."
>>> eyecite.get_citations(test_sentence)[0].full_span()
(13, 26)

However, if the same citation was a FullCaseCitation, what is included differs:

>>> test_sentence = "See Sargent v. Columbia Forest Prods., 75 F.3d 86 (2d Cir. 1996) (explaining that blah blah blah)."
>>> eyecite.get_citations(test_sentence)[0].full_span()
(4, 97)

I am working in an application that requires all full_span definitions to be more like the latter, so I've made a small set of changes to ShortCaseCitation, IdCitation, and SupraCitation.

No existing tests seem to break, but I have not written new tests for the changed behavior.

If this is desired behavior; that is, if it would be helpful to harmonize these definitions by always including the parenthetical and antecedent, I can write some tests and clean this up a bit into a PR. Let me know if that would be helpful.

@mlissner
Copy link
Member

Makes sense to me. Thank you!

@mattdahl
Copy link
Contributor

I agree, this behavior should definitely be the same for full vs. short/supra/id citations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants