From 1bb797f7835cb3ad2d1e52c65d5331294ace816a Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 23 Jan 2016 21:59:49 -0500 Subject: [PATCH] [fix] spacing in phrases --- scripts/geodata/osm/osm_address_training_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/osm/osm_address_training_data.py b/scripts/geodata/osm/osm_address_training_data.py index b58f3c87..d8b0baa9 100644 --- a/scripts/geodata/osm/osm_address_training_data.py +++ b/scripts/geodata/osm/osm_address_training_data.py @@ -412,7 +412,7 @@ def osm_abbreviate(gazetteer, s, language, abbreviate_prob=0.3, separate_prob=0. token = random.choice(abbreviations) if abbreviations else canonical token = recase_abbreviation(token, tokens[i:i + len(t)]) abbreviated.append(token) - if i + len(t) < n - 1 and raw_tokens[i + len(t)][0] > sum(raw_tokens[i + len(t) - 1][:2]): + if i + len(t) < n and raw_tokens[i + len(t)][0] > sum(raw_tokens[i + len(t) - 1][:2]): abbreviated.append(u' ') break elif is_prefix: