Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pyap/source_US/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,15 @@ def str_list_to_upper_lower_regex(str_list: List[str]) -> str:
"Xrds",
]

street_type_leading_list = ["Camino", "El\ Camino", "Avenue", "Blvd", "Ave"]
street_type_leading_list = [
"Camino",
"El\ Camino",
"Avenue",
"Blvd",
"Ave",
"La\ Rue",
"Rue",
]


def street_type_list_to_regex(street_type_list: list[str]) -> str:
Expand Down
5 changes: 4 additions & 1 deletion tests/test_parser_us.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

""" Test for USA address parser """
"""Test for USA address parser"""

import re
import pytest
Expand Down Expand Up @@ -236,6 +236,7 @@ def test_post_direction(input, expected):
("I- 35", True),
("I-35 Service Road", True),
("BAY", True),
("Rue", True),
# negative assertions
# TODO
],
Expand All @@ -251,6 +252,7 @@ def test_street_type(input, expected):
# positive assertions
("ED DR", True),
("El Camino Real", True),
("La Rue", True),
# negative assertions
("Camino Del Toro Loco", False),
],
Expand Down Expand Up @@ -645,6 +647,7 @@ def test_full_street_positive(input, expected):
("123 Route 75 STE 155 Toms River, NJ 08755", True),
("1234 WOODMONT DRIVE NORTHWEST APT# APT F-15 LENOIR NC 28645", True),
("1234 N Front Street\nSuite 3 South\nHarrisburg, PA 17102", True),
("206 La Rue France, Lafayette, LA, 70508", True),
# negative assertions
("ONE HEALING CENTER LLC, 16444", False),
("85 STEEL REGULAR SHAFT - NE", False),
Expand Down