From 6374bf411b88f44882be65d8fa07dacdd0878677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20S=C3=A1nchez?= Date: Sun, 18 Feb 2018 21:13:08 +0000 Subject: [PATCH] Remove garbage in the name after semicolons (issue #10) --- hgwnames.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hgwnames.py b/hgwnames.py index bb116811..2d9ccaf2 100644 --- a/hgwnames.py +++ b/hgwnames.py @@ -19,6 +19,7 @@ def normalize(text): def parse(name): """Transform the name of a street from Cadastre conventions to OSM ones.""" + name = name.split(';')[0] # Remove additional information name = re.sub('[,]+', ', ', name).strip() # Avoids comma without trailing space result = [] for (i, word) in enumerate(re.split('[ ]+', name.strip())):