From 2f9a58f37bc490a1b96f7678ed9b4a617c3d1ba0 Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 14 Apr 2016 14:33:02 -0400 Subject: [PATCH] [expansion] Add postcode dictionary to gazetteer types --- scripts/geodata/address_expansions/address_dictionaries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/address_expansions/address_dictionaries.py b/scripts/geodata/address_expansions/address_dictionaries.py index 013d3629..8fde38dd 100644 --- a/scripts/geodata/address_expansions/address_dictionaries.py +++ b/scripts/geodata/address_expansions/address_dictionaries.py @@ -92,6 +92,7 @@ gazetteer_types = { 'personal_titles': 'DICTIONARY_PERSONAL_TITLE', 'place_names': 'DICTIONARY_PLACE_NAME', 'post_office': 'DICTIONARY_POST_OFFICE', + 'postcode': 'DICTIONARY_POSTCODE', 'qualifiers': 'DICTIONARY_QUALIFIER', 'staircase': 'DICTIONARY_STAIRCASE', 'stopwords': 'DICTIONARY_STOPWORD', @@ -152,7 +153,6 @@ class AddressPhraseDictionaries(object): if dictionary_name not in gazetteer_types: raise InvalidAddressFileException(u'Invalid filename for file {}/{}. Must be one of {{{}}}'.format(language_dir, filename, ', '.join(sorted(gazetteer_types)))) - self.language_dictionaries[language].append(dictionary_name) for i, line in enumerate(open(os.path.join(language_dir, filename))):