From: Sarah Hoffmann Date: Fri, 19 Nov 2021 20:12:17 +0000 (+0100) Subject: don't penalize French 'bis' housenumbers X-Git-Tag: v4.0.1~1^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/3a2597e5c461627d25a8d2273d29490f335ec88b don't penalize French 'bis' housenumbers House numbers of the form '9 bis' are usual in France. So be a bit more lenient before adding penalties to house numbers with letters in them. Fixes #2527. --- diff --git a/lib-php/TokenHousenumber.php b/lib-php/TokenHousenumber.php index f7bdc471..ea7a052e 100644 --- a/lib-php/TokenHousenumber.php +++ b/lib-php/TokenHousenumber.php @@ -58,7 +58,7 @@ class HouseNumber // up of numbers, add a penalty $iSearchCost = 1; if (preg_match('/\\d/', $this->sToken) === 0 - || preg_match_all('/[^0-9]/', $this->sToken, $aMatches) > 2) { + || preg_match_all('/[^0-9 ]/', $this->sToken, $aMatches) > 3) { $iSearchCost += strlen($this->sToken) - 1; } if (!$oSearch->hasOperator(\Nominatim\Operator::NONE)) {