diff --git a/pyap/source_US/data.py b/pyap/source_US/data.py index f452fc5..f22d8c8 100644 --- a/pyap/source_US/data.py +++ b/pyap/source_US/data.py @@ -121,7 +121,8 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str: # On the other hand, there are streets like "Ed Drive" and "M Street". street_name_multi_word_re = r""" (?: - \b[a-zA-Z0-9\ \.\-\'\’]{3,41}|\b[A-Z][A-Za-z]?(?=\ [A-Z]) + \b(?!\d{2}\s\d{2}) + [a-zA-Z0-9\ \.\-\'\’]{3,41}|\b[A-Z][A-Za-z]?(?=\ [A-Z]) ) """ diff --git a/tests/test_parser_us.py b/tests/test_parser_us.py index bd98a94..3d8b9f9 100644 --- a/tests/test_parser_us.py +++ b/tests/test_parser_us.py @@ -484,6 +484,7 @@ def test_po_box_positive(input, expected): ("817 S.E. 55TH", True), ("2817 PETERS ROAD BAY 52", True), # negative assertions + ("6 95 34 75 COMPANY PHONE IS", False), (", 666 Hell ST PMB 29700", False), ], )