<?php
+/**
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ * This file is part of Nominatim. (https://nominatim.org)
+ *
+ * Copyright (C) 2022 by the Nominatim developer community.
+ * For a full list of authors see the git log.
+ */
@define('CONST_LibDir', dirname(dirname(__FILE__)));
require_once(CONST_LibDir.'/init-cmd.php');
if ($bVerbose) {
echo "\n";
}
+
+ $oTokenizer = new \Nominatim\Tokenizer($oDB);
+
+ $aWords = $oTokenizer->mostFrequentWords(1000);
+
$sSQL = 'SELECT word FROM word WHERE word is not null ORDER BY search_name_count DESC LIMIT 1000';
- foreach ($oDB->getCol($sSQL) as $sWord) {
+ foreach ($aWords as $sWord) {
if ($bVerbose) {
echo "$sWord = ";
}