<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Sarah,<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you very much for the response.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Another related question, does this abbreviation wiki page is been used as a data source in Nominatim?<br><br><a href="https://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations">https://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations</a><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The text says it does but I couldn't find any reference to it in the docs at the Github repository.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks,<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Vitor<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><br><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 5, 2017 at 4:42 PM, Sarah Hoffmann <span dir="ltr"><<a href="mailto:lonvia@denofr.de" target="_blank">lonvia@denofr.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On Wed, Apr 05, 2017 at 08:37:52AM -0300, Vitor George wrote:<br>
> ​When searching​<br>
>  "Biblioteca Prestes Maia" [1]<br>
> ​the ​<br>
> best result should be "Biblioteca Prefeito Prestes Maia" [2], instead the<br>
> results are<br>
</span>> ​ other *bibliotecas* (libraries) with different names. This affects very<br>
<span class="">> much the usability of Nominatim in Portuguese.<br>
><br>
> Is there support to stop words? Could Nominatim be using PostgreSQL full<br>
> text search?<br>
<br>
</span>Nominatim has limited support for searching for partial words and also<br>
for a few stop words. However, the latter is very difficult to implement<br>
in a system that has to work with arbirary languages. As it happens,<br>
search in your example trips over stop words. What happens is this:<br>
<br>
'en' is marked as a stop word in Nominatim because it is 'and' in<br>
some languages. Stop words are handled in Nominatim by removing them<br>
completely from search terms and queries. Nominatim can also handle<br>
so-called special phrases which are used for POI search. These allow<br>
you to enter phrases like 'restaurant near Trafalgar Square' or<br>
'supermarket in Berlin'. One of the Spanish special phrases is<br>
'biblioteca in'. Because of the stop word deletion that gets shortend<br>
to 'biblioteca'. So, one of the interpretations of your search<br>
query above becomes 'find me a library in Prestes Maia'. And that's<br>
the results you see.<br>
<br>
To resolve this, the stop word handling in Nominatim needs to be<br>
changed to not unconditionally delete stop words but leave them<br>
in where they are essential. This is unfortunately not a simple<br>
change and requires rewriting some of the fundamentals of how<br>
query normalisation works. Until it's done I'm rather reluctant<br>
to add new stop words or special terms.<br>
<br>
Kind regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Sarah<br>
<br>
</font></span></blockquote></div><br></div></div>