Skip to content
Open
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
4 changes: 2 additions & 2 deletions pyap/source_CA/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@
floor = r"""
(?P<floor>
(?:
\d+[A-Za-z]{0,2}\.?\ [Ff][Ll][Oo][Oo][Rr]\
\d+[A-Za-z]{0,2}\.?\ [Ff][Ll][Oo][Oo][Rr]\ ?
)
|
(?:
[Ff][Ll][Oo][Oo][Rr]\ \d+[A-Za-z]{0,2}\
[Ff][Ll][Oo][Oo][Rr]\ \d+[A-Za-z]{0,2}\ ?
)
)
"""
Expand Down
4 changes: 2 additions & 2 deletions pyap/source_GB/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@
floor = r"""
(?P<floor>
(?:
\d+[A-Za-z]{0,2}\.?\ [Ff][Ll][Oo][Oo][Rr]\
\d+[A-Za-z]{0,2}\.?\ [Ff][Ll][Oo][Oo][Rr]\ ?
)
|
(?:
[Ff][Ll][Oo][Oo][Rr]\ \d+[A-Za-z]{0,2}\
[Ff][Ll][Oo][Oo][Rr]\ \d+[A-Za-z]{0,2}\ ?
)
) # end floor
"""
Expand Down
4 changes: 2 additions & 2 deletions pyap/source_US/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ def street_type_list_to_regex(street_type_list):
floor = r"""
(?P<floor>
(?:
\d+[A-Za-z]{0,2}\.?\ [Ff][Ll][Oo][Oo][Rr]\
\d+[A-Za-z]{0,2}\.?\ [Ff][Ll][Oo][Oo][Rr]\ ?
)
|
(?:
[Ff][Ll][Oo][Oo][Rr]\ \d+[A-Za-z]{0,2}\
[Ff][Ll][Oo][Oo][Rr]\ \d+[A-Za-z]{0,2}\ ?
)
)
"""
Expand Down
2 changes: 2 additions & 0 deletions test_parser_ca.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ def test_po_box_negative(input, expected):
("3351, boul. des Forges C.P. 500, Trois-Rivières (Québec)"
" Canada, G9A 5H7", True),
("3264 Mainway Burlington L7M 1A7 Ontario, Canada", True),
("20 Fleeceline Road, Floor 3, Toronto, Ontario M8V 2K3", True),
("20 Fleeceline Road, 3rd Floor, Toronto, Ontario M8V 2K3", True),
])
def test_full_address_positive(input, expected):
''' tests exact string match for a full address '''
Expand Down
2 changes: 2 additions & 0 deletions test_parser_gb.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ def test_country(input, expected):
("No. 22 The Light, The Headrow, Leeds LS1 8TL", True),
("55 Glenfada Park, Londonderry BT48 9DR", True),
("Studio 53, Harrison cove, Smithbury, G88 4US", True),
("Floor 4, 32 London Bridge St, London SE1 9SG", True),
("4th Floor, 32 London Bridge St, London SE1 9SG", True),
# negative assertions
("85 STEEL REGULAR SHAFT - NE", False),
("3 STRUCTURE WITH PE", False),
Expand Down
2 changes: 2 additions & 0 deletions test_parser_us.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ def test_full_street_positive(input, expected):
("1500 Westlake Avenue North Suite 108 Seattle, WA 98109", True),
("840 Garrison Brooks Suite 985, New Sarah, OH 38255", True),
("840 Garrison Brooks Suite 985 New Sarah, OH 38255", True),
("5545 Langston Blvd, Floor 2, Arlington, VA 22207", True),
("5545 Langston Blvd., 2nd Floor, Arlington, VA 22207", True),
# negative assertions
("85 STEEL REGULAR SHAFT - NE", False),
("3 STRUCTURE WITH PE", False),
Expand Down