/// <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); }
/// <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); }