From 03ca4bd7dc234832e1c8400ca6b3eaf83c41d74c Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 12 Sep 2019 13:42:35 -0400 Subject: [PATCH] Add tests for addresses with hyphens Connects https://github.com/pelias/schema/issues/301 Connects https://github.com/pelias/schema/pull/375 Connects https://github.com/pelias/schema/issues/65 --- test_cases/address_parsing.json | 42 ++++++++++++++++++++++++++++++++ test_cases/french_addresses.json | 40 ++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/test_cases/address_parsing.json b/test_cases/address_parsing.json index ddd1a8f..e3612b3 100644 --- a/test_cases/address_parsing.json +++ b/test_cases/address_parsing.json @@ -363,6 +363,48 @@ } ] } + }, + { + "id": 11, + "status": "pass", + "issue": "https://github.com/pelias/schema/issues/65", + "user": "julian", + "in": { + "text": "Friedrich-Richter-Straße 51" + }, + "expected": { + "properties": [ + { + "housenumber": "51", + "street": "Friedrich-Richter-Straße", + "confidence": 1, + "match_type": "exact", + "accuracy": "point", + "locality": "Berlin" + } + ] + } + }, + { + "id": "11.1", + "status": "pass", + "issue": "https://github.com/pelias/schema/issues/65", + "user": "julian", + "in": { + "text": "Friedrich Richter Straße 51" + }, + "expected": { + "properties": [ + { + "housenumber": "51", + "street": "Friedrich-Richter-Straße", + "confidence": 1, + "match_type": "exact", + "accuracy": "point", + "locality": "Berlin" + } + ] + } } ] } diff --git a/test_cases/french_addresses.json b/test_cases/french_addresses.json index dbd41b3..acd616e 100644 --- a/test_cases/french_addresses.json +++ b/test_cases/french_addresses.json @@ -46,6 +46,25 @@ ] } }, + { + "id": "2-no-hyphen", + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "20 Boulevard Saint Martin, Paris" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-martin", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, { "id": "2-abbrev", "status": "fail", @@ -304,6 +323,27 @@ } ] } + }, + { + "id": "11", + "status": "pass", + "user": "orangejulius", + "type": "france", + "description": "address without hyphens", + "issue": "https://github.com/pelias/api/pull/1268", + "in": { + "text": "20 boulevard saint germain, paris, france" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-Germain", + "locality": "Paris", + "country_a": "FRA" + } + ] + } } ] }