]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/tokenizer/icu_tokenizer.php
Merge pull request #2559 from lonvia/disable-jit-in-queries
[nominatim.git] / lib-php / tokenizer / icu_tokenizer.php
index ca224a224861f5bd2e0f126cf10be5ea0edf5488..f4dd3aebd4db2a4e853df13037e75ecb64b3f47a 100644 (file)
@@ -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.' '));