X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/1618aba5f282a27fc45af28c4eeebb6dcd28c332..5ab0a63fd6881f1b7273363e7f20562bc5e8dc39:/lib-php/tokenizer/legacy_icu_tokenizer.php diff --git a/lib-php/tokenizer/legacy_icu_tokenizer.php b/lib-php/tokenizer/legacy_icu_tokenizer.php index ea445f23..b2fc27c7 100644 --- a/lib-php/tokenizer/legacy_icu_tokenizer.php +++ b/lib-php/tokenizer/legacy_icu_tokenizer.php @@ -156,6 +156,8 @@ class Tokenizer $aDBWords = $this->oDB->getAll($sSQL, null, 'Could not get word tokens.'); foreach ($aDBWords as $aWord) { + $iId = (int) $aWord['word_id']; + switch ($aWord['type']) { 'C': // country name tokens if ($aWord['country'] === null @@ -166,12 +168,13 @@ class Tokenizer } $oToken = new Token\Country($iId, $aWord['country']) break; + 'H': // house number tokens + $oToken = new Token\HouseNumber($iId, $aWord['word_token']); + break; default: continue; } -/* $iId = (int) $aWord['word_id']; - - if ($aWord['class']) { +/* if ($aWord['class']) { // Special terms need to appear in their normalized form. // (postcodes are not normalized in the word table) $sNormWord = $this->normalizeString($aWord['word']);