logo separator

[mkgmap-dev] Again on address search in latin countries

From Enrico Liboni eliboni at gmail.com on Mon Sep 19 22:58:35 BST 2016

Carlos, you are right, no approach seems perfect - anyway the rule for
label 3 is the expected one: one would search for "Emanuele" (or as a 2nd
option for  "Vittorio") so it will match label 3 (or 4). Your example for
Avenida de la Libertad woull work as well, since one label would be
"Libertad, Avenida de la Libertad" (however I agree we should better remove
a list of "street names beginnings", which can implemented in rules as well
instead of in the code). Current approach with --x-split-name-index woudl
just show you a list of "libertad" labels without telling you the full name.

Enrico

On Mon, Sep 19, 2016 at 6:21 PM, Carlos Dávila <cdavilam at orangecorreo.es>
wrote:

> I see some issues with your approach. First of all, I don't agree last
> word is the meaningful one, at least for Spanish. I can think of many real
> street names where it is not true.
>
> If I got that right, your rule for label:3 won't give the expected result
> for special cases treated in previous lines. For example, "Via Vittorio
> Emanuele XI" would became "Emanuele XI, Via Vittoria Emanuele "
>
> And for label:4, removing first word would also give wrong names in many
> cases, where the type of way (Via, Rue, Avenida, etc) is followed by some
> articles or prepositions, which is very common. For example, Avenida de la
> Libertad would became "de la Libertad", which doesn't make much sense and
> is not very useful for search. For these cases it could be useful to have a
> list of "street names beginnings" to be removed (eg. Calle, Calle de la,
> Calle de el, Calle del, Calle la, Calle, el, etc.)
>
> El 18/09/16 a las 09:33, Enrico Liboni escribió:
>
> Folks the index branch has been merged with main since sometime and the
> experimental --x-split-name-index works for me as documented but I still
> don't get an optimal user experience.
>
> Example, there might be multiple streets named with the same word (example
> in Padova, Italy: Via Dietro Duomo, Piazza del Duomo, Galleria Duomo): if
> you type "Duomo" the expected behaviour is to have the gps to show the list
> of available matches, while in the current implementation three lines with
> just the word "Duomo" appears and you don't know which one to pick.
>
> Without the --x-split-name-index option, adding the below to "inc/address"
> produces imho a better result overall for latin countries. Please evaluate
> if to embed some of the logic in "--x-split-name-index" option to set the
> appropriate labels with the full name of the street,  which if I understood
> correctly is what the navigator shows.
>
>
> Thanks!
>
> Enrico
>
>
> # Add in inc/address
> # Step 1: in latin countries the last word of a street name is the
> meaningful one, so get it and
> # consider the exception when the last two words are the meaningful ones
> (like "Via Vittorio Emanuele XI").
> #
> # Get the last full word if a \s (whitespace) exist in name
> ( mkgmap:country=ITA  | mkgmap:country=FRA | mkgmap:country=CHE |
> mkgmap:country=ESP) & highway=* & name ~ '.*\s.*' { set
> last:word='${name|part: :-1}' }
> # if the last full word is a roman number - i.e. if a street has been
> named after a King or a Pope - get the last two words
> last:word ~ '(I|II|III|IV|V|VI.*|IX|X|XI.*|XV.*|XX.*)'  {set
> last:word='${name|part: >-3}' }
> #
> # Step 2: set the labels used for address search (3&4):
> #  the 3rd label  is set with the last:word as 1st word followed by comma
> and the remaining words
> #     i.e. 'Via Wolfgang Amadeus Mozart' becomes 'Mozart, Via Wolfgang
> Amadeus'
> #  the 4th label is set  the 1st word (that is usually Via, Rue, Avenida
> etc, so not really useful in search)
> #     i.e. 'Via Wolfgang Amadeus Mozart' becomes 'Wolfgang Amadeus Mozart'
> last:word=*  { set mkgmap:label:3='${last:word}, ${name|part: <-1}';set
> mkgmap:label:4='${name|part: >1}' }
>
>
>
> _______________________________________________
> mkgmap-dev mailing listmkgmap-dev at lists.mkgmap.org.ukhttp://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160919/c19c441e/attachment.html>


More information about the mkgmap-dev mailing list