To remove apostophe what should I do?

Which is preferable to modify the ICU normalization rule to remove apostrophes during search instead of changing the python query preprocessing?

There are 125 pages in the Python category on the OSM wiki and a score of libraries mentioned on the Software Libraries page that reference Python.

I suspect it would be easier for people to help with some context about what you’re using and what you’re trying to do.

I am studying about nominatim and investigating how apostrophes are handled in search normlization. Currently, punctuations are handled as - ,so peter’s is read as peter s instead of peters. I would like to understand the recommended way to adjust so both are treated equally..

It depends what you want to do. When I needed Nominatim to do something different I just treated it as a black box and modified the input data. That won’t help if your goal is to “understand what Nominatim does internally” rather than “achieve a desired result”.

I am trying to solve issue #3703 so that words words ending with s and ‘s are treated equally. But I have a doubt in which will be the correct place in the pipeline to implement this which is helpful for both import and query processing.

Here’s the link to this issue:
Ignore apostrophes when searching ¡ Issue #3703 ¡ osm-search/Nominatim ¡ GitHub with thoughts of @lonvia about the options to solve this problem:

I added some tags to this topic too.

2 Likes

Thanks for outlining the options. For option 2 ,is it efficient to store more versions of the search key during indexing compare to changing the search logic?