public static Token[] Stem(Token[] tokens) { PorterStemmer stemmer = new PorterStemmer(); foreach (Token t in tokens) { string word = t.OringinalContent.ToLower(); string root = getRootForm(lmtz, word); t.ProcessedContent= stemmer.stemTerm(root).ToLower(); } return tokens; }
public static Token[] Stem(Token[] tokens) { PorterStemmer stemmer = new PorterStemmer(); foreach (Token t in tokens) { string word = t.OringinalContent.ToLower(); string root = getRootForm(lmtz, word); t.ProcessedContent = stemmer.stemTerm(root).ToLower(); } return(tokens); }
public Stopword_Remover() { StreamReader reader = new StreamReader(@"Resource\Data\stop_words.txt"); string nextLine = ""; List<string> stopwordlist = new List<string>(); PorterStemmer stemmer = new PorterStemmer(); while ((nextLine = reader.ReadLine()) != null) { stopwordlist.Add(stemmer.stemTerm(nextLine.Trim())); } stopwords = stopwordlist.ToArray(); reader.Close(); }
public Stopword_Remover() { StreamReader reader = new StreamReader(@"Resource\Data\stop_words.txt"); string nextLine = ""; List <string> stopwordlist = new List <string>(); PorterStemmer stemmer = new PorterStemmer(); while ((nextLine = reader.ReadLine()) != null) { stopwordlist.Add(stemmer.stemTerm(nextLine.Trim())); } stopwords = stopwordlist.ToArray(); reader.Close(); }