diff --git a/pyap/source_CA/data.py b/pyap/source_CA/data.py index eccaad8..90f60fb 100644 --- a/pyap/source_CA/data.py +++ b/pyap/source_CA/data.py @@ -309,11 +309,11 @@ floor = r""" (?P (?: - \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}\ ? ) ) """ diff --git a/pyap/source_GB/data.py b/pyap/source_GB/data.py index bbbc9f2..64c8548 100644 --- a/pyap/source_GB/data.py +++ b/pyap/source_GB/data.py @@ -217,11 +217,11 @@ floor = r""" (?P (?: - \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 """ diff --git a/pyap/source_US/data.py b/pyap/source_US/data.py index 07f9086..401a97d 100644 --- a/pyap/source_US/data.py +++ b/pyap/source_US/data.py @@ -257,11 +257,11 @@ def street_type_list_to_regex(street_type_list): floor = r""" (?P (?: - \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}\ ? ) ) """ diff --git a/test_parser_ca.py b/test_parser_ca.py index 5cf5a9d..5f26e77 100644 --- a/test_parser_ca.py +++ b/test_parser_ca.py @@ -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 ''' diff --git a/test_parser_gb.py b/test_parser_gb.py index 6612894..1ca84e0 100644 --- a/test_parser_gb.py +++ b/test_parser_gb.py @@ -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), diff --git a/test_parser_us.py b/test_parser_us.py index d3d1243..32eda7c 100644 --- a/test_parser_us.py +++ b/test_parser_us.py @@ -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),