[Geocoding] Concatenated abbreviations and Nominatims tokenstringreplacements.inc
Sarah Hoffmann
lonvia at denofr.de
Mon Mar 3 18:48:35 UTC 2014
Hi,
On Wed, Feb 26, 2014 at 02:21:56PM +0000, Anders Gunnarsson wrote:
> There seems to be a problem with concatenated abbreviations in tokenstringreplacements.inc. There is a space before the abbreviated version, as seen in this example
>
> str_replace(buffer, &len, &changes, "gatan ", 6, " g ", 3, 0);
>
> The result is that if I try to find the street "Kungsgatan" using the correct abbreviation "Kungsg", I don't find anything. However using the incorrect "Kungs g", I find "Kungsgatan". Is there a reason for the leading space in some case or is it just a mistake?
The idea behind the space is that the name can also be found when the suffix
is separated, i.e. for "Kungsgatan" one may also type "Kungs gatan" or
"Kungs-gatan". That "Kungsg" doesn't work is certainly a bug. Feel free to
report it.
> The file seems to be outdated compared to http://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations Is there a tool for generation from the wiki?
There is a script for that, although it is not publicly available (yet).
In any case, it is unlikely that the script will be run again any time
soon because any change to tokenstringreplacements.inc breaks existing
databases. Sooner or later we need to come up with a more flexible way
to handle abbreviations.
Sarah
More information about the Geocoding
mailing list