Skip to content

Commit

Permalink
Add tests for addresses with hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejulius committed Sep 18, 2019
1 parent eabd34a commit 59dd201
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test_cases/address_parsing.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
}
]
}
60 changes: 60 additions & 0 deletions test_cases/french_addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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",
Expand Down Expand Up @@ -304,6 +343,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"
}
]
}
}
]
}

0 comments on commit 59dd201

Please sign in to comment.