Example #1
0
        //a constractor
        public Parse(string swPath, bool stem)
        {
            parserList = new List <string>();
            string line;

            stemBool  = stem;
            docInfo   = new Dictionary <string, DocumentData>();
            stopWords = new HashSet <string>();

            StreamReader file = new StreamReader("stop_words.txt");

            stemmer = new Stemmer();

            //read the stopwords file and add them to the hashSet
            while ((line = file.ReadLine()) != null)
            {
                stopWords.Add(line.ToLower());
            }

            //initialize the monthes dictionary
            months = new Dictionary <string, string>();

            addMonthes();
        }
Example #2
0
 public SearchEngine()
 {
     stemmer = new Stemmer();
 }
Example #3
0
 public static string stemToken(string token, Stemmer stemmer)
 {
     stemmer.add(token.ToCharArray(), token.Length);
     stemmer.stem();
     return(new String(stemmer.getResultBuffer(), 0, stemmer.getResultLength()));
 }
Example #4
0
 public StemmingSequence()
 {
     this.stemmer = new Stemmer();
 }