Skip to content

Commit

Permalink
Support one-letter avenue names
Browse files Browse the repository at this point in the history
  • Loading branch information
lmelninkas committed Sep 3, 2024
1 parent 3115233 commit 95260dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyap/source_US/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str:

# This pattern should be quite conservative because it will be followed by
# optional matchers - we want to avoid matching too much with this.
street_name_one_word_re = r"(?:[A-Z][A-Za-z]{2,15})"
street_name_one_word_re = r"(?:[A-Z][A-Za-z]{,15})"


interstate_specs = [
Expand Down Expand Up @@ -769,7 +769,7 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str:
"Xrds",
]

street_type_leading_list = ["Camino", "El\ Camino"]
street_type_leading_list = ["Camino", "El\ Camino", "Avenue"]


def street_type_list_to_regex(street_type_list: list[str]) -> str:
Expand Down
1 change: 1 addition & 0 deletions tests/test_parser_us.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ def test_full_street_positive(input, expected):
"input,expected",
[
# positive assertions
("1234 Avenue N, Rosenberg, Texas 77777", True),
("One Baylor Plaza MS: BCM204\nHouston TX 77030-3411", True),
("ONE ADP DRIVE\nMS CORP 003\nAUGUSTA, GA 30909", True),
("2755 CARPENTER RD SUITE 1W\nANN ARBOR, MI, US, 48108", True),
Expand Down

0 comments on commit 95260dc

Please sign in to comment.