From 78d621ac854f2dd2959a754a42716a5b9204663f Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 15 Feb 2018 18:13:27 -0500 Subject: [PATCH] [fix] adding street type gazetteer to name component as well for things like "24th St Cheese Co" --- src/expand.c | 2 -- src/gazetteer_data.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/expand.c b/src/expand.c index 7ddf188b..b26355d4 100644 --- a/src/expand.c +++ b/src/expand.c @@ -744,8 +744,6 @@ bool address_phrase_contains_unambiguous_expansion(phrase_t phrase) { return false; } -// Delete non-canonical phrases only - string_tree_t *add_string_alternatives_phrase_option(char *str, libpostal_normalize_options_t options, expansion_phrase_option_t phrase_option) { char_array *key = NULL; diff --git a/src/gazetteer_data.c b/src/gazetteer_data.c index 444c225e..8d284a77 100644 --- a/src/gazetteer_data.c +++ b/src/gazetteer_data.c @@ -34,7 +34,7 @@ gazetteer_t gazetteer_config[] = { {DICTIONARY_QUALIFIER, LIBPOSTAL_ADDRESS_STREET}, {DICTIONARY_STAIRCASE, LIBPOSTAL_ADDRESS_STAIRCASE}, {DICTIONARY_STOPWORD, LIBPOSTAL_ADDRESS_ANY}, - {DICTIONARY_STREET_TYPE, LIBPOSTAL_ADDRESS_STREET}, + {DICTIONARY_STREET_TYPE, LIBPOSTAL_ADDRESS_STREET | LIBPOSTAL_ADDRESS_NAME}, {DICTIONARY_SURNAME, LIBPOSTAL_ADDRESS_STREET | LIBPOSTAL_ADDRESS_NAME}, {DICTIONARY_SYNONYM, LIBPOSTAL_ADDRESS_ANY}, {DICTIONARY_TOPONYM, LIBPOSTAL_ADDRESS_NAME | LIBPOSTAL_ADDRESS_STREET | LIBPOSTAL_ADDRESS_TOPONYM},