]> git.wh0rd.org - tt-rss.git/commitdiff
add more english common words to bayes ignore list
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 18 Jun 2015 05:42:17 +0000 (08:42 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 18 Jun 2015 05:42:17 +0000 (08:42 +0300)
plugins/af_sort_bayes/lib/class.naivebayesian.php

index da81f2aabe5cebfc56041b7f3b213cd3a97f2514..4a4ffa7eba521ba3f674106911a683a8e9cfafc0 100644 (file)
                 @return array ignore list
                 */
                function getIgnoreList() {
-                       return array('the', 'that', 'you', 'for', 'and');
+                       //return array('the', 'that', 'you', 'for', 'and');
+
+                       // https://en.wikipedia.org/wiki/Most_common_words_in_English
+                       return array('the', 'be', 'to', 'of', 'and', 'a', 'in', 'that', 'have', 'I', 'it', 'for', 'not', 'on', 'with',
+                               'he', 'as', 'you', 'do', 'at', 'this', 'but', 'his', 'by', 'from', 'they', 'we', 'say', 'her',
+                               'she', 'or', 'an', 'will', 'my', 'one', 'all', 'would', 'there', 'their', 'what', 'so', 'up',
+                               'out', 'if', 'about', 'who', 'get', 'which', 'go', 'me', 'when', 'make', 'can', 'like', 'time',
+                               'no', 'just', 'him', 'know', 'take', 'people', 'into', 'year', 'your', 'good', 'some', 'could',
+                               'them', 'see', 'other', 'than', 'then', 'now', 'look', 'only', 'come', 'its', 'over', 'think',
+                               'also', 'back', 'after', 'use', 'two', 'how', 'our', 'work', 'first', 'well', 'way', 'even',
+                               'new', 'want', 'because', 'any', 'these', 'give', 'day', 'most', 'us', 'read', 'more');
+
                }
 
                /** get the tokens from a string