예제 #1
0
 * Requires
 */
die;
require_once '../../inc/global.inc.php';
require_once 'langstats.class.php';
/**
 * Init
 */
$terms_limit = 10000 + 50;
$x_most_popular = 2000;
$output = false;
$ls = new langstats();
if ($ls === false) {
    exit($ls->error);
}
$list = $ls->get_popular_terms($x_most_popular);
if ($_GET['output'] == 1) {
    $output = true;
    $variables_origin = $ls->get_variables_origin();
}
/**
 * Display
 */
if (count($list) == 0) {
    echo 'No terms loaded so far';
}
if (count($list) > 0) {
    $i = 1;
    $j = 1;
    $k = 0;
    $files = array();
 * Requires
 */
require_once '../../inc/global.inc.php';
require_once 'langstats.class.php';
global $_configuration;
$_configuration['language_measure_frequency'] = 0;
$langstats = new langstats();
$orig_lang = 'english';
/**
 * Init
 */
$words_limit = 10000;
//change this if you want more words
$terms_limit = 3000;
//change this if you think you'll need more terms
$terms = $langstats->get_popular_terms($terms_limit);
$words_counter = 0;
$i = 0;
$terms_in_limit = array();
$lang_dir = api_get_path(SYS_LANG_PATH);
$arch_dir = api_get_path(SYS_ARCHIVE_PATH);
/**
 * Code run
 */
foreach ($terms as $row) {
    if ($words_counter > 10000) {
        break;
    }
    $words = str_word_count(get_lang($row['term_name'], null, $orig_lang));
    $words_counter += $words;
    $terms_in_limit[$row['term_name']] = $i;