From 66a458ffc79ae0c2bd08abdf6c6afb1909013d13 Mon Sep 17 00:00:00 2001 From: semhul Date: Thu, 11 Jan 2018 16:00:04 +0100 Subject: [PATCH] Moving libpostal unit configuration into updated logic --- controller/libpostal.js | 1 + package.json | 1 - test/unit/controller/libpostal.js | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/controller/libpostal.js b/controller/libpostal.js index 7ecbe3b6..48763e1e 100644 --- a/controller/libpostal.js +++ b/controller/libpostal.js @@ -9,6 +9,7 @@ var field_mapping = { island: 'island', category: 'category', house: 'query', + unit: 'unit', house_number: 'number', road: 'street', suburb: 'neighbourhood', diff --git a/package.json b/package.json index 813a4c20..154717ea 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "pelias-model": "sweco-semhul/model#adding-address-unit", "pelias-query": "sweco-semhul/query#adding-address-unit", "pelias-sorting": "1.1.0", - "pelias-text-analyzer": "sweco-semhul/text-analyzer#adding-address-unit", "predicates": "^2.0.0", "retry": "^0.10.1", "stats-lite": "^2.0.4", diff --git a/test/unit/controller/libpostal.js b/test/unit/controller/libpostal.js index cf62fff5..00a30166 100644 --- a/test/unit/controller/libpostal.js +++ b/test/unit/controller/libpostal.js @@ -185,6 +185,10 @@ module.exports.tests.success_conditions = (test, common) => { label: 'house', value: 'house value' }, + { + label: 'unit', + value: 'unit value' + }, { label: 'house_number', value: 'house_number value' @@ -244,6 +248,7 @@ module.exports.tests.success_conditions = (test, common) => { island: 'island value', category: 'category value', query: 'house value', + unit: 'unit value', number: 'house_number value', street: 'road value', neighbourhood: 'suburb value',