diff --git a/classifier/scheme/venue.js b/classifier/scheme/venue.js index fae74356..a420a61b 100644 --- a/classifier/scheme/venue.js +++ b/classifier/scheme/venue.js @@ -186,7 +186,7 @@ module.exports = [ scheme: [ { is: ['PlaceClassification', 'VenueClassification'], - not: ['StreetClassification'] + not: ['StreetClassification', 'StreetSuffixClassification'] }, { is: ['AlphaClassification'], diff --git a/resources/pelias/dictionaries/libpostal/nb/concatenated_suffixes_separable.txt b/resources/pelias/dictionaries/libpostal/nb/concatenated_suffixes_separable.txt new file mode 100644 index 00000000..5fd3e6f6 --- /dev/null +++ b/resources/pelias/dictionaries/libpostal/nb/concatenated_suffixes_separable.txt @@ -0,0 +1,2 @@ +# Causes a bunch of issues with Spanish addresses ("Calle" is a common prefix) +!alle diff --git a/test/address.esp.test.js b/test/address.esp.test.js index a63a43b8..643386e0 100644 --- a/test/address.esp.test.js +++ b/test/address.esp.test.js @@ -5,6 +5,11 @@ const testcase = (test, common) => { { street: 'Carrer d\'Aragó' }, { housenumber: '155' }, { postcode: '08011' }, { locality: 'Barcelona' } ]) + + assert('Calle Principal 20 Barcelona', [ + { street: 'Calle Principal' }, { housenumber: '20' }, + { locality: 'Barcelona' } + ]) } module.exports.all = (tape, common) => { diff --git a/test/address.usa.test.js b/test/address.usa.test.js index 50abb10a..c3ae0f57 100644 --- a/test/address.usa.test.js +++ b/test/address.usa.test.js @@ -285,6 +285,11 @@ const testcase = (test, common) => { // https://github.com/pelias/pelias/issues/912 assert('Jefferson Parish', [{ locality: 'Jefferson' }]) assert('Mills County', [{ locality: 'Mills' }]) + + // Partial admin match that triggered a regression in 2.5.0 + assert('Main St Seattl', [ + { street: 'Main St' } + ]) } module.exports.all = (tape, common) => {