Skip to content

Commit 7fe20ee

Browse files
authored
feat(es): Patches for bugs introduced in 2.4 and 2.5 releases (#187)
* Patches for bugs introduced in 2.4 and 2.5 releases * Use blacklist; revert change to libpostal source file
1 parent fa51897 commit 7fe20ee

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

classifier/scheme/venue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ module.exports = [
186186
scheme: [
187187
{
188188
is: ['PlaceClassification', 'VenueClassification'],
189-
not: ['StreetClassification']
189+
not: ['StreetClassification', 'StreetSuffixClassification']
190190
},
191191
{
192192
is: ['AlphaClassification'],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Causes a bunch of issues with Spanish addresses ("Calle" is a common prefix)
2+
!alle

test/address.esp.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ const testcase = (test, common) => {
55
{ street: 'Carrer d\'Aragó' }, { housenumber: '155' },
66
{ postcode: '08011' }, { locality: 'Barcelona' }
77
])
8+
9+
assert('Calle Principal 20 Barcelona', [
10+
{ street: 'Calle Principal' }, { housenumber: '20' },
11+
{ locality: 'Barcelona' }
12+
])
813
}
914

1015
module.exports.all = (tape, common) => {

test/address.usa.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ const testcase = (test, common) => {
285285
// https://github.com/pelias/pelias/issues/912
286286
assert('Jefferson Parish', [{ locality: 'Jefferson' }])
287287
assert('Mills County', [{ locality: 'Mills' }])
288+
289+
// Partial admin match that triggered a regression in 2.5.0
290+
assert('Main St Seattl', [
291+
{ street: 'Main St' }
292+
])
288293
}
289294

290295
module.exports.all = (tape, common) => {

0 commit comments

Comments
 (0)