forked from edward/owl-map
Look for more variations of street names
This commit is contained in:
parent
badef91b97
commit
2c8ac7259c
|
@ -430,8 +430,9 @@ def api_get_item_tags(item_id):
|
|||
duration=t1)
|
||||
|
||||
|
||||
def expand_street_name(name):
|
||||
ret = {name}
|
||||
def expand_street_name(from_names):
|
||||
ret = set(from_names)
|
||||
for name in from_names:
|
||||
if any(name.startswith(st) for st in ('St ', 'St. ')):
|
||||
first_space = name.find(' ')
|
||||
ret.add("Saint" + name[first_space:])
|
||||
|
@ -444,6 +445,7 @@ def expand_street_name(name):
|
|||
for n in set(ret):
|
||||
ret.extend(part.strip() for part in n.split("/"))
|
||||
|
||||
ret.update({"The " + name for name in ret if not name.startswith("The ")})
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue