Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changes:

Fixes:
- Modifies rendering of AhocorasickTokenizer parameter in API docs II
- No longer removing lowercase words from plaintiff

## Current

Expand Down
3 changes: 1 addition & 2 deletions eyecite/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ def _process_case_name(
else:
plaintiff, defendant = "", splits[0]
plaintiff = plaintiff.strip(f"{whitespace},(")
clean_plaintiff = re.sub(r"\b[a-z]\w*\b", "", plaintiff)
plaintiff = strip_stop_words(clean_plaintiff)
plaintiff = strip_stop_words(plaintiff)
citation.metadata.plaintiff = plaintiff
else:
defendant = candidate_case_name
Expand Down
9 changes: 8 additions & 1 deletion tests/test_FindTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,14 @@ def test_find_citations(self):
# Fix for index error when searching for case name
("<p>State v. Luna-Benitez (S53965). Alternative writ issued, dismissed, 342 Or 255</p>",
[case_citation(volume="342", reporter="Or", page="255")],
{'clean_steps': ['html', 'inline_whitespace']})
{'clean_steps': ['html', 'inline_whitespace']}),
# Previously, this test would fail because lowercase words were removed from
# the plaintiff name.
('City of Davis v. Coleman, 521 F.2d 661 (9th Cir. 1975)',
[case_citation(volume='521', reporter='F.2d', page='661', year=1975,
metadata={'plaintiff': 'City of Davis',
'defendant': 'Coleman',
'court': 'ca9'})])
)

# fmt: on
Expand Down
Loading