Skip to content

Commit 175f788

Browse files
Famlamfrodrigo
authored andcommitted
Avoid close name for NNth (#2581)
1 parent 1ddc183 commit 175f788

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

analysers/analyser_osmosis_highway_name_close.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
sql10_regex = """regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace(regexp_replace({0},
2828
'([0-9]+-[а-я]{{2}})( |$)', '_', 'g'), -- Bulgaria
2929
'[-\\[\\]\\{{\\}}\\(\\)\"\\\\/]', '', 'g'),
30-
'(1st|2nd|3rd|[04-9]th)( |$)', '_', 'g'),
31-
'(1ra|2da|3ra|4ta|5ta|6ta|7ma|8va|9na|0ma|1er|2do|3ro|4to|5to|6to|7mo|8vo|9no|0mo)( |$)', '_', 'g'),
30+
'[0-9]*(1st|2nd|3rd|[04-9]th)( |$)', '_', 'g'),
31+
'[0-9]*(1ra|2da|3ra|4ta|5ta|6ta|7ma|8va|9na|0ma|1er|2do|3ro|4to|5to|6to|7mo|8vo|9no|0mo)( |$)', '_', 'g'), -- Spanish
3232
'[/.0-9\u0660-\u0669\u06F0-\u06F9\u2160-\u2188]', ' ', 'g'), -- Numbers, Arabic numbers (u06**), Roman numbers (u21**)
3333
'(^| )[a-zA-Z](?= |$)', '\\1', 'g'),
3434
'(^| )[IVXLDCM]+(?= |$)', '\\1', 'g'),
@@ -79,7 +79,7 @@ class Analyser_Osmosis_Highway_Name_Close(Analyser_Osmosis):
7979
def __init__(self, config, logger = None):
8080
Analyser_Osmosis.__init__(self, config, logger)
8181

82-
# Check langues for country are writen with alphabets
82+
# Check that languages for countries are written with alphabets
8383
self.alphabet = 'language' in config.options and languages.languages_are_alphabets(config.options['language'])
8484

8585
if self.alphabet:

0 commit comments

Comments
 (0)