Skip to content

Feature: Expose plaintiff/defendant as citation fields #12

@medelman17

Description

@medelman17

Current State

Plaintiff names are extracted internally by DocumentResolver.extractPartyName() for supra resolution, but they are not exposed as fields on the citation object itself.

The extraction logic looks backward up to 100 characters from the citation start for a "Name v. Name," pattern. It handles multi-word names (not limited to 2 words like Python eyecite's bug in #193).

Expected Behavior

Full case citations should include plaintiff and defendant fields:

interface FullCaseCitation {
  // ... existing fields
  plaintiff?: string   // "Lee County School Dist. No. 1"
  defendant?: string   // "Gardner"
}

Design Considerations

  • Extraction requires looking at text before the citation, not just the matched text
  • Party names can be complex: "Lee County School Dist. No. 1", abbreviations, "et al."
  • Stop words: "v.", "v", "vs."
  • The existing resolver logic could be refactored into a shared utility
  • Consider edge cases: in re, ex parte, state/people/commonwealth as plaintiff

Upstream Reference

Python eyecite #193 — their bug is the 2-word limit. We don't have this bug in our resolver, but we don't expose the field either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions