public List <string> PreprocessText(string text) { return(text .Split() .Where(wrd => !filters.Any(fltr => fltr.ShouldExclude(wrd))) .Select(wrd => wordProcessor.ProcessWord(wrd)) .ToList()); }
// The main word processing algorithm public static void ProcessWords(IWordReader reader, IWordProcessor processor) { string word; while((word = reader.ReadWord()) != null) { processor.ProcessWord(word); } processor.Finish(); }
public void RunWithoutFinish() { Processor.Start(); string word; while ((word = Reader.ReadWord()) != null) { Processor.ProcessWord(word); } }
// The main word processing algorithm public static void ProcessWords(IWordReader reader, IWordProcessor processor) { string word; while ((word = reader.ReadWord()) != null) { processor.ProcessWord(word); } processor.Finish(); }