Browse Source

feat(libpostal_patch): enable field mapping for "unit"

pull/1216/head
Peter Johnson 6 years ago
parent
commit
27a9e1d900
  1. 3
      controller/libpostal.js
  2. 4
      test/unit/controller/libpostal.js

3
controller/libpostal.js

@ -17,7 +17,8 @@ var field_mapping = {
state_district: 'county', state_district: 'county',
state: 'state', state: 'state',
postcode: 'postalcode', postcode: 'postalcode',
country: 'country' country: 'country',
unit: 'unit',
}; };
// This controller calls the hosted libpostal service and converts the response // This controller calls the hosted libpostal service and converts the response

4
test/unit/controller/libpostal.js

@ -439,7 +439,7 @@ module.exports.tests.bug_fixes = (test, common) => {
text: 'original query', text: 'original query',
parser: 'libpostal', parser: 'libpostal',
parsed_text: { parsed_text: {
// unit: '11', unit: '11',
number: '1015', number: '1015',
street: 'nudgee road', street: 'nudgee road',
neighbourhood: 'banyo', neighbourhood: 'banyo',
@ -503,7 +503,7 @@ module.exports.tests.bug_fixes = (test, common) => {
text: 'original query', text: 'original query',
parser: 'libpostal', parser: 'libpostal',
parsed_text: { parsed_text: {
// unit: '999', unit: '99',
number: '11/1015', number: '11/1015',
street: 'nudgee road', street: 'nudgee road',
neighbourhood: 'banyo', neighbourhood: 'banyo',

Loading…
Cancel
Save