Beispiel #1
0
        public void TestSetStopWords()
        {
            var tfidf = new TfidfExtractor();

            tfidf.SetStopWords(@"Resources\stop_words_test.txt");
            var text   = GetFileContents(@"Resources\article_sports.txt");
            var result = tfidf.ExtractTags(text, 30);

            foreach (var tag in result)
            {
                Console.WriteLine(tag);
            }
        }
Beispiel #2
0
        public void TestSetStopWords()
        {
            var tfidf = new TfidfExtractor();

            // Use less stopwords than default stopword list.
            tfidf.SetStopWords(TestHelper.GetResourceFilePath("stop_words_test.txt"));
            var text   = GetFileContents(TestHelper.GetResourceFilePath("article.txt"));
            var result = tfidf.ExtractTags(text, 30);

            foreach (var tag in result)
            {
                Console.WriteLine(tag);
            }
        }