Esempio n. 1
0
 public void Init()
 {
     preFact  = new FilePreprocessFactory(new TextProcessorFactory(new SentenceDetectorFactory(), new TokenizerFactory(), new StemmerFactory()));
     docFact  = new DocumentReaderFactory();
     basePath = Helpers.GetProjectDir();
     stop     = new StopwordsFile(basePath + "\\stopwords.txt", DocumentType.Text, preFact, docFact);
 }
Esempio n. 2
0
        public void Stopwords_Integration_Exists_WordNotExistsReturnFalse()
        {
            var basePath  = Helpers.GetProjectDir();
            var stopwords = new StopwordsFile(basePath + "\\stopwords.txt", DocumentType.Text, preFact, docFact);
            var word      = "poop";

            var res = stopwords.Exists(word);

            Assert.AreEqual(false, res);
        }
Esempio n. 3
0
 public void Stopwords_Integration_Ctor_FileNotExistsException()
 {
     var basePath  = Helpers.GetProjectDir();
     var stopwords = new StopwordsFile(basePath + "\\oops.txt", DocumentType.Text, preFact, docFact);
 }