Amélioration de la détection des noms de communes

This commit is contained in:
Jean-Marie Favreau 2025-01-18 15:42:59 +01:00
parent 1b15ea6b2b
commit 3d84a79c29

View File

@ -33,7 +33,7 @@ class PlaceGuesser:
return addr return addr
def __guess_city_name(self, part): def __guess_city_name(self, part):
part = part.strip().replace(" - ", "-") part = part.replace(" - ", "-").replace("(", "").replace(")", "").strip()
if len(part) == 0: if len(part) == 0:
return None return None
part = self.__remove_accents(part.lower()).replace("-", " ") part = self.__remove_accents(part.lower()).replace("-", " ")