Skip to content

Commit

Permalink
Refuse phone as address
Browse files Browse the repository at this point in the history
  • Loading branch information
lmelninkas committed Oct 10, 2024
1 parent fe4c2d0 commit 16ac58e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyap/source_US/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
)
"""

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 @@ -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),
],
)
Expand Down

0 comments on commit 16ac58e

Please sign in to comment.