From c380b3e91b85aaff0313df3367695990700a9005 Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 15 Feb 2017 22:32:30 -0500 Subject: [PATCH] [parser] phrase search with address dictionaries should not use the language given at training time since it's not currently available at runtime (without pulling in the language classifier, which may be warranted at some point, especially if the model can be made smaller/sparser) --- src/address_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/address_parser.c b/src/address_parser.c index a642eef4..d025c48e 100644 --- a/src/address_parser.c +++ b/src/address_parser.c @@ -685,16 +685,16 @@ void address_parser_context_fill(address_parser_context_t *context, address_pars size_t num_tokens = tokens->n; - bool have_address_phrases = search_address_dictionaries_tokens_with_phrases(normalized_str, normalized_tokens, context->language, &address_dictionary_phrases); + bool have_address_phrases = search_address_dictionaries_tokens_with_phrases(normalized_str, normalized_tokens, NULL, &address_dictionary_phrases); token_phrase_memberships(address_dictionary_phrases, address_phrase_memberships, num_tokens); for (size_t i = 0; i < num_tokens; i++) { token_t token = tokens->a[i]; - phrase_t prefix_phrase = search_address_dictionaries_prefix(str + token.offset, token.len, language); + phrase_t prefix_phrase = search_address_dictionaries_prefix(str + token.offset, token.len, NULL); phrase_array_push(context->prefix_phrases, prefix_phrase); - phrase_t suffix_phrase = search_address_dictionaries_suffix(str + token.offset, token.len, language); + phrase_t suffix_phrase = search_address_dictionaries_suffix(str + token.offset, token.len, NULL); phrase_array_push(context->suffix_phrases, suffix_phrase); }