osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
3.18k stars 712 forks source link

Replace special phrases from wiki #2180

Open lonvia opened 3 years ago

lonvia commented 3 years ago

I'd like to see collection and translation of the special phrases shared with other projects, so that the barrier of for contribution becomes lower.

The iD project has started a preset collection here: https://github.com/openstreetmap/id-tagging-schema This looks like a good start for a replacement for our custom special phrases. Main disadvantage is that presets usually miss plural forms of the phrases which we need.

matkoniecz commented 7 months ago

So it could be done by replacing/augmenting https://github.com/osm-search/Nominatim/blob/4315debff588a5aa67840eda07bcc85d265f923b/nominatim/tools/special_phrases/sp_wiki_loader.py#L53

Is it OK to do it in the same way (python script downloading data from iD presets or elsewhere and returning it in the same format)?

Or would something smarter would be needed to be accepted?

Main disadvantage is that presets usually miss plural forms of the phrases which we need.

Maybe using some dictionary dataset and pluralizing known entries would work? (I did something similar with processing recipes and it worked fine, even in Polish which has far more declinations then English).

lonvia commented 7 months ago

This should become an alternative importer: nominatim speical-phrases --import-from-id-presets

Maybe using some dictionary dataset and pluralizing known entries would work?

We'd need an open source dataset for it.