<div dir="ltr"><div>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.<br><br></div>Enrico<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 6:21 PM, Carlos Dávila <span dir="ltr"><<a href="mailto:cdavilam@orangecorreo.es" target="_blank">cdavilam@orangecorreo.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>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.</p>
<p>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 "</p>
<p>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.)<br>
</p>
<br>
<div>El 18/09/16 a las 09:33, Enrico Liboni
escribió:<br>
</div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
<br>
Thanks!<br>
<br>
Enrico<br>
<br>
<br>
<font size="1"><span style="font-family:monospace,monospace">#
Add in inc/address<br>
# Step 1: in latin countries the last word of a street name
is the meaningful one, so get it and <br>
# consider the exception when the last two words are the
meaningful ones (like "Via Vittorio Emanuele XI").<br>
#<br>
# Get the last full word if a \s (whitespace) exist in name<br>
( mkgmap:country=ITA | mkgmap:country=FRA |
mkgmap:country=CHE | mkgmap:country=ESP) & highway=*
& name ~ '.*\s.*' { set last:word='${name|part: :-1}' }<br>
# 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<br>
last:word ~ '(I|II|III|IV|V|VI.*|IX|X|XI.*<wbr>|XV.*|XX.*)' {set
last:word='${name|part: >-3}' }<br>
#<br>
# Step 2: set the labels used for address search (3&4):
<br>
# the 3rd label is set with the last:word as 1st word
followed by comma and the remaining words<br>
# i.e. 'Via Wolfgang Amadeus Mozart' becomes 'Mozart,
Via Wolfgang Amadeus'<br>
# the 4th label is set the 1st word (that is usually Via,
Rue, Avenida etc, so not really useful in search)<br>
# i.e. 'Via Wolfgang Amadeus Mozart' becomes 'Wolfgang
Amadeus Mozart'<br>
last:word=* { set mkgmap:label:3='${last:word},
${name|part: <-1}';set mkgmap:label:4='${name|part:
>1}' }</span></font><br>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
mkgmap-dev mailing list
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/<wbr>mailman/listinfo/mkgmap-dev</a></pre>
</blockquote>
</div>
<br>______________________________<wbr>_________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">http://www.mkgmap.org.uk/<wbr>mailman/listinfo/mkgmap-dev</a><br></blockquote></div><br></div>