]> git.openstreetmap.org Git - nominatim.git/commit
add direction penalties
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 11 Apr 2025 18:41:06 +0000 (20:41 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 11 Apr 2025 18:41:06 +0000 (20:41 +0200)
commit06e39e42d80c144d0a517a8bb19ad8c1d4c0ea2a
treefa453dfa141dc5ac9dfde1a8d9c923ca2aab89e5
parent2ef0e20a3f90e92d2aa926623fe012c8a708271a
add direction penalties

Direction penalties are estimated by getting the name to address
ratio usage for each partial term in the query and computing the
linear regression of that ratio over the entire phrase. Or to put
it in ither words: we try to determine if the terms at the beginning
or the end of the query are more likely to constitute a name.

Direction penalties are currently used only in classic name queries.
src/nominatim_api/search/geocoder.py
src/nominatim_api/search/query.py
src/nominatim_api/search/token_assignment.py