X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/13e7398566909044348e57163cbd87a2095e8e80..16cc395f7834774ac7c518a1e2ba9584ef44a896:/lib-php/tokenizer/icu_tokenizer.php diff --git a/lib-php/tokenizer/icu_tokenizer.php b/lib-php/tokenizer/icu_tokenizer.php index ca224a22..f4dd3aeb 100644 --- a/lib-php/tokenizer/icu_tokenizer.php +++ b/lib-php/tokenizer/icu_tokenizer.php @@ -40,6 +40,15 @@ class Tokenizer return $this->oNormalizer->transliterate($sTerm); } + + public function mostFrequentWords($iNum) + { + $sSQL = "SELECT word FROM word WHERE type = 'W'"; + $sSQL .= "ORDER BY info->'count' DESC LIMIT ".$iNum; + return $this->oDB->getCol($sSQL); + } + + private function makeStandardWord($sTerm) { return trim($this->oTransliterator->transliterate(' '.$sTerm.' '));