From 3d84a79c29f51973c7fda4e698be39417e6e421b Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 18 Jan 2025 15:42:59 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20la=20d=C3=A9tection=20?= =?UTF-8?q?des=20noms=20de=20communes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agenda_culturel/utils.py b/src/agenda_culturel/utils.py index cf5b303..ea69f65 100644 --- a/src/agenda_culturel/utils.py +++ b/src/agenda_culturel/utils.py @@ -33,7 +33,7 @@ class PlaceGuesser: return addr def __guess_city_name(self, part): - part = part.strip().replace(" - ", "-") + part = part.replace(" - ", "-").replace("(", "").replace(")", "").strip() if len(part) == 0: return None part = self.__remove_accents(part.lower()).replace("-", " ")