Esempio n. 1
0
 /// <summary>
 /// Assign value to the stemmed word and the type
 /// </summary>
 public void Process()
 {
     PunctuationMarker.Mark(this);
     Stemmer.Stem(this); // convert to root form
     StopwordMarker.Mark(this);
     IrregularMarker.Mark(this);
 }
Esempio n. 2
0
        /// <summary>
        /// Load the stopwords from the txt file
        /// </summary>
        internal static async Task <string[]> Load()
        {
            string[]      lines        = System.IO.File.ReadAllLines(@"stop_words.txt");
            List <string> stopwordlist = new List <string>();

            foreach (string line in lines)
            {
                string stemmedStopword = Stemmer.Stem(line.Trim());
                stopwordlist.Add(stemmedStopword);
            }
            stopwords = stopwordlist.ToArray();
            return(stopwords);
        }