From 27a9e1d9003e96995b934e3e058b946088e5d8e4 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 23 Oct 2018 14:38:52 +0200 Subject: [PATCH] feat(libpostal_patch): enable field mapping for "unit" --- controller/libpostal.js | 3 ++- test/unit/controller/libpostal.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/controller/libpostal.js b/controller/libpostal.js index 2a608568..ab178530 100644 --- a/controller/libpostal.js +++ b/controller/libpostal.js @@ -17,7 +17,8 @@ var field_mapping = { state_district: 'county', state: 'state', postcode: 'postalcode', - country: 'country' + country: 'country', + unit: 'unit', }; // This controller calls the hosted libpostal service and converts the response diff --git a/test/unit/controller/libpostal.js b/test/unit/controller/libpostal.js index def911a8..4ea530fc 100644 --- a/test/unit/controller/libpostal.js +++ b/test/unit/controller/libpostal.js @@ -439,7 +439,7 @@ module.exports.tests.bug_fixes = (test, common) => { text: 'original query', parser: 'libpostal', parsed_text: { - // unit: '11', + unit: '11', number: '1015', street: 'nudgee road', neighbourhood: 'banyo', @@ -503,7 +503,7 @@ module.exports.tests.bug_fixes = (test, common) => { text: 'original query', parser: 'libpostal', parsed_text: { - // unit: '999', + unit: '99', number: '11/1015', street: 'nudgee road', neighbourhood: 'banyo',