From ffe3221a1f2da372e1e73a5769bc300e87617e3d Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Wed, 18 Sep 2019 13:55:39 -0400 Subject: [PATCH] More French address tests 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 | 60 ++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/test_cases/address_parsing.json b/test_cases/address_parsing.json index e3612b3..dd0f09f 100644 --- a/test_cases/address_parsing.json +++ b/test_cases/address_parsing.json @@ -385,6 +385,48 @@ ] } }, + { + "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" + } + ] + } + }, + { + "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", diff --git a/test_cases/french_addresses.json b/test_cases/french_addresses.json index acd616e..2a021b7 100644 --- a/test_cases/french_addresses.json +++ b/test_cases/french_addresses.json @@ -65,6 +65,45 @@ ] } }, + { + "id": "2-no-hyphen", + "status": "fail", + "user": "adefarge", + "type": "france", + "description": "fails due to poor libpostal parse", + "in": { + "text": "20 Boulevard Saint Martin, Paris" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-martin", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": "2-no-hyphen-correct-format", + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "Boulevard Saint Martin 20, Paris" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-martin", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, { "id": "2-abbrev", "status": "fail", @@ -324,6 +363,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" + } + ] + } + }, { "id": "11", "status": "pass",