diff --git a/pyap/source_US/data.py b/pyap/source_US/data.py index bb6f47c..f452fc5 100644 --- a/pyap/source_US/data.py +++ b/pyap/source_US/data.py @@ -230,7 +230,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str: "Avenue", "Avn", "Avnue", - "Bay", + "Bay(?!\ [1-9])", "Bayoo", "Bayou", "Bch", diff --git a/tests/test_parser.py b/tests/test_parser.py index 78c809a..6761e68 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -207,6 +207,18 @@ def test_combine_results(): "postal_code": "77030-3411", }, ), + ( + "2817 PETERS ROAD BAY 52, Amazeville, AL 12345", + { + "street_number": "2817", + "street_type": "ROAD", + "street_name": "PETERS", + "occupancy": "BAY 52", + "city": "Amazeville", + "region1": "AL", + "postal_code": "12345", + }, + ), ], ) def test_parse_address(input: str, expected): diff --git a/tests/test_parser_us.py b/tests/test_parser_us.py index b779c35..bd98a94 100644 --- a/tests/test_parser_us.py +++ b/tests/test_parser_us.py @@ -482,6 +482,7 @@ def test_po_box_positive(input, expected): ("P.O. BOX 41256, One Velvet Drive", True), ("666 Hell ST PMB 29700", True), ("817 S.E. 55TH", True), + ("2817 PETERS ROAD BAY 52", True), # negative assertions (", 666 Hell ST PMB 29700", False), ],