diff --git a/CHANGES.md b/CHANGES.md index 8e4ab05..d2d8b1f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Changes: Fixes: - Modifies rendering of AhocorasickTokenizer parameter in API docs II +- No longer removing lowercase words from plaintiff ## Current diff --git a/eyecite/helpers.py b/eyecite/helpers.py index 84213cb..b5a99f8 100644 --- a/eyecite/helpers.py +++ b/eyecite/helpers.py @@ -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 diff --git a/tests/test_FindTest.py b/tests/test_FindTest.py index 13bfe01..b6762e5 100644 --- a/tests/test_FindTest.py +++ b/tests/test_FindTest.py @@ -828,7 +828,14 @@ def test_find_citations(self): # Fix for index error when searching for case name ("
State v. Luna-Benitez (S53965). Alternative writ issued, dismissed, 342 Or 255
", [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