From: Andrew Dolgov Date: Wed, 17 Jun 2015 19:13:58 +0000 (+0300) Subject: show ugly minimum word count for auto categorizing in prefs ui X-Git-Tag: 16.3~290 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=fa05356a88c9f886afbcf8a85be7368771ff613d show ugly minimum word count for auto categorizing in prefs ui --- diff --git a/plugins/af_sort_bayes/init.php b/plugins/af_sort_bayes/init.php index 517d684d..f36ae914 100644 --- a/plugins/af_sort_bayes/init.php +++ b/plugins/af_sort_bayes/init.php @@ -7,6 +7,7 @@ class Af_Sort_Bayes extends Plugin { private $dbh; private $score_modifier = 50; private $sql_prefix = "ttrss_plugin_af_sort_bayes"; + private $auto_categorize_threshold = 10000; function about() { return array(1.0, @@ -209,6 +210,8 @@ class Af_Sort_Bayes extends Plugin { print "

" . __("Statistics") . "

"; + print "

".T_sprintf("Required UGLY word count for automatic matching: %d", $this->auto_categorize_threshold)."

"; + print ""; print ""; @@ -288,7 +291,7 @@ class Af_Sort_Bayes extends Plugin { $bayes_content = mb_strtolower($article["title"] . " " . strip_tags($article["content"])); - if ($count_neutral >= 10000) { + if ($count_neutral >= $this->auto_categorize_threshold) { // enable automatic categorization $result = $nb->categorize($bayes_content);
CategoryProbabilityWordsArticles