mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
housenumber position should hint on direction
rather than increasing penalty.
This commit is contained in:
@@ -225,13 +225,14 @@ class _TokenSequence:
|
|||||||
|
|
||||||
|
|
||||||
def _adapt_penalty_from_priors(self, priors: int, new_dir: int) -> bool:
|
def _adapt_penalty_from_priors(self, priors: int, new_dir: int) -> bool:
|
||||||
if priors == 2:
|
if priors >= 2:
|
||||||
self.penalty += 1.0
|
|
||||||
elif priors > 2:
|
|
||||||
if self.direction == 0:
|
if self.direction == 0:
|
||||||
self.direction = new_dir
|
self.direction = new_dir
|
||||||
else:
|
else:
|
||||||
return False
|
if priors == 2:
|
||||||
|
self.penalty += 0.8
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user