[intersections] Using name cleanup on intersections, including tiger:name_base which sometimes has semicolon delimiters as well

This commit is contained in:
Al
2016-08-17 18:47:07 -04:00
parent 7b314324ca
commit 701bcb1d79

View File

@@ -1089,19 +1089,22 @@ class OSMAddressFormatter(object):
formatted_intersections = []
for (w1, w1_base), (w2, w2_base) in itertools.combinations(way_names, 2):
w1 = self.components.cleaned_name(w1)
w2 = self.components.cleaned_name(w2)
intersection = IntersectionQuery(road1=w1, intersection_phrase=intersection_phrase, road2=w2)
formatted = self.formatter.format_intersection(intersection, address_components, country, language, tag_components=tag_components)
formatted_intersections.append(formatted)
if w1_base and not namespaced_language and random.random() < replace_with_base_name_prob:
w1 = w1_base
w1 = self.components.cleand_name(w1_base)
intersection = IntersectionQuery(road1=w1, intersection_phrase=intersection_phrase, road2=w2)
formatted = self.formatter.format_intersection(intersection, address_components, country, language, tag_components=tag_components)
formatted_intersections.append(formatted)
if w2_base and not namespaced_language and random.random() < replace_with_base_name_prob:
w2 = w2_base
w2 = self.components.cleaned_name(w2_base)
intersection = IntersectionQuery(road1=w1, intersection_phrase=intersection_phrase, road2=w2)
formatted = self.formatter.format_intersection(intersection, address_components, country, language, tag_components=tag_components)