I attempt to handle this kind of thing in the styles, for addresses in
the Netherlands where the most significant part is usually the last word
of the street name and the first few words may be "filler" information -
often personal names/titles etc of famous people. Using the following
rules I find the last word of the name and add it as an additional label
if it "qualifies".
# CS: capture last part of name for dutch names in street index - limit
to known suffixes to reduce crud
highway=* & mkgmap:country=NLD & name=* {set cs:lastpart='${name|part:
:-1}'; }
cs:lastpart=* & !(cs:lastpart ~
'.*(weg|straat|laan|plantsoen|dijk|singel|vaart|wetering|kamp|slag|dreef|steeg|hof|dal|pad|plein)')
{ delete cs:lastpart; }
# CS: get alternative name in the index
cs:lastpart=* & name!=$cs:lastpart {addlabel '${cs:lastpart}';}
It might not be so easy to parse other languages - what in Dutch would
be Karl Marxstraat, in German you might write Karl-Marx-Strasse, which
would need extraction of the last two parts.
I think also the use of a stop-word list has been discussed before, but
it gets complicated because the stop-words are language-dependent (and
not simply country-dependent).
--colin
On 2015-12-31 10:21, Gerd Petermann wrote:
> I think these problems are better handled in the style, see inc/address:
>
> mkgmap:country=DEU & mkgmap:city!=* & mkgmap:admin_level8=* { set
> mkgmap:city='${mkgmap:admin_level8|subst:Gemeinde |subst:Stadt}' }
> or
> mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level8=* { set
> mkgmap:city='${mkgmap:admin_level8|subst:City of }' }
>
> Besides that the relation "Ciudad Autónoma de Buenos Aires"
> http://www.openstreetmap.org/relation/1224652
> also has a role=label member called "Bueonos Aires" :
> http://www.openstreetmap.org/node/81590481
>
> Gerd
>
> ________________________________________
> Von: [email protected]
> <[email protected]> im Auftrag von Diego Massanti
> <[email protected]>
> Gesendet: Donnerstag, 31. Dezember 2015 09:41
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Address search index questions.
>
> Well i live in Argentina, and our main capital is named "Ciudad Autonoma de
> Buenos Aires", however some people will just refer to it as "Buenos Aires".
> Im sure i can find some other examples specially in spanish, but so far i
> faced the problem when typing "Buenos Aires" and getting back zero results
> just because the "official" name is the other one.
>
> // Diego
>
> On Dec 31, 2015, at 05:38, Gerd Petermann <[email protected]>
> wrote:
>
> Hi Diego,
>
> do you have examples for such city names ? I can only think of e.g. San
> Francisco, New York etc.
> I think those would not benefit.
>
> Gerd
>
> ________________________________________
> Von: [email protected]
> <[email protected]> im Auftrag von Diego Massanti
> <[email protected]>
> Gesendet: Donnerstag, 31. Dezember 2015 09:32
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Address search index questions.
>
> In fact it is not documented, it kind of works for street names, but not for
> cities. I haven't looked at the code, but i think that it separates the
> street names into words, and then adds all the words to the index. It would
> be great if we could implement this also for city names!
>
> // Diego On Dec 31, 2015, at 05:30, Thomas Morgenstern <[email protected]>
> wrote:
>
> Hi, the option --x-splitt-name-index is new for me. Is a documentation for
> this option available ?. In ..\mkgmap-r3650\doc\options.txt it is not
> descripted. Can i use both options --index and --x-splitt-name-index
> togehter ? or only solo 1 option ?
>
> regards thomas
>
> On Dec 30, 2015, at 18:25, Gerd Petermann <[email protected]>
> wrote:
>
> Hi Diego,
>
> I think --x-split-name-index is the option you are looking for.
>
> ciao,
> Gerd
>
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev