From f8d185aaff9c1a5a332a119a65dbf32117953958 Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 27 Jul 2016 16:13:57 -0400 Subject: [PATCH] [osm/formatting] Tag commas in a given labeld component with the SEP tag so e.g. concatenated districts can be counted as separate phrases --- scripts/geodata/address_formatting/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/address_formatting/formatter.py b/scripts/geodata/address_formatting/formatter.py index e6981c3d..eaef9ec2 100644 --- a/scripts/geodata/address_formatting/formatter.py +++ b/scripts/geodata/address_formatting/formatter.py @@ -711,7 +711,7 @@ class AddressFormatter(object): return self.get_template_from_config(self.templates_place_only, country, language=language) def tagged_tokens(self, name, label): - return six.u(' ').join([six.u('{}/{}').format(t.replace(' ', ''), label) for t, c in tokenize(name)]) + return six.u(' ').join([six.u('{}/{}').format(t.replace(' ', ''), label if t != ',' else self.separator_tag) for t, c in tokenize(name)]) def format_category_query(self, category_query, address_components, country, language, tag_components=True): if tag_components: