[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH] i18n: reorder spanish de terminants

From: Thomas Petazzoni
Subject: [Maposmatic-dev] [PATCH] i18n: reorder spanish de terminants
Date: Fri, 27 Apr 2012 16:05:28 +0200

Due to the order of spanish determinants, a street such as "Calle de
los Huertos" was indexed under "los Huertos (Calle de)" instead of
"Huertos (Calle de los)". Same problem for "de la" or "de las". By
reordering the determinants so that the most specific ones are
considered first, we can achieve the desired behaviour.

for an example of many current problems.

Signed-off-by: Thomas Petazzoni <address@hidden>
 ocitysmap2/ |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ocitysmap2/ b/ocitysmap2/
index 9c6d7af..7a99255 100644
--- a/ocitysmap2/
+++ b/ocitysmap2/
@@ -194,8 +194,9 @@ class i18n_es_generic(i18n):
             u"Calzada", u"Camino", u"Camí", u"Carrer", u"Carretera",
             u"Glorieta", u"Parque", u"Pasaje", u"Pasarela", u"Paseo", u"Plaza",
             u"Plaça", u"Privada", u"Puente", u"Ronda", u"Salida", u"Travesia" ]
-    DETERMINANTS = [ u" de", u" de la", u" del", u" de las",
-                     u" dels", u" de los", u" d'", u" de l'", u"" ]
+    DETERMINANTS = [ u" de la", u" de los", u" de las",
+                     u" dels", u" del", u" d'", u" de l'",
+                     u" de", u"" ]
     SPACE_REDUCE = re.compile(r"\s+")
     PREFIX_REGEXP = re.compile(r"^(?P<prefix>(%s)(%s)?)\s?\b(?P<name>.+)" %

reply via email to

[Prev in Thread] Current Thread [Next in Thread]