<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body 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 class="moz-cite-prefix">El 18/09/16 a las 09:33, Enrico Liboni
escribió:<br>
</div>
<blockquote
cite="mid:CAJ2VMa=bEQX4huaAqQhDOZtMdX_5zaHvtMSu+tO85da3+qf-wA@mail.gmail.com"
type="cite">
<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.*|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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mkgmap-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
<a class="moz-txt-link-freetext" href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></pre>
</blockquote>
</body>
</html>