A tool for extracting legal citations from text strings. Version 2.7.6 supports Python >=3.10, with a focus on US legal materials. Released irregularly by the Free Law Project.
pip install eyeciteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Extract all citations from a string. Returns a list of Citation objects.
Access citation text via str(cite) or cite.citation.
Preprocess text as needed (e.g., remove non-citation markup).
Import functions directly from eyecite.
Use the `index` attribute on Citation objects to get the start position.
For non-US citations, consider alternative libraries or custom reporters.
Upgrade eyecite: pip install --upgrade eyecite
Update code: for cite in citations: print(cite.citation)