X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2ae293aeb629050f03b3f9b88b80c3c1e724df5e..1e86dc1d932a672f1c83b5abc2906016b7500de1:/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 09cfe70f..92dd7272 100644 --- a/lib-php/tokenizer/legacy_icu_tokenizer.php +++ b/lib-php/tokenizer/legacy_icu_tokenizer.php @@ -47,9 +47,7 @@ class Tokenizer private function makeStandardWord($sTerm) { - $sNorm = ' '.$this->oTransliterator->transliterate($sTerm).' '; - - return trim(str_replace(CONST_Abbreviations[0], CONST_Abbreviations[1], $sNorm)); + return trim($this->oTransliterator->transliterate(' '.$sTerm.' ')); } @@ -90,6 +88,7 @@ class Tokenizer foreach ($aPhrases as $iPhrase => $oPhrase) { $sNormQuery .= ','.$this->normalizeString($oPhrase->getPhrase()); $sPhrase = $this->makeStandardWord($oPhrase->getPhrase()); + Debug::printVar('Phrase', $sPhrase); if (strlen($sPhrase) > 0) { $aWords = explode(' ', $sPhrase); Tokenizer::addTokens($aTokens, $aWords);