public WordAnalyzer(WordPreprocessing wordPreprocessing) { WordPacks = wordPreprocessing .Words .Then(words => words .GroupBy(w => w) .Select(g => new WordPack(g.Key, g.Count())) .ToArray()) .RefineError("Word analyze fail"); }
public void SetUp() { words = new string[] { "3", "3", "3", "2", "2", "1", "A", "a", "aAa", "подсолнух", "трава" }; wordPreprocessing = new WordPreprocessing(words); }
public WordAnalizer(WordPreprocessing wordPreprocessing) { WordPacks = wordPreprocessing.Words.GroupBy(w => w).Select(g => new WordPack(g.Key, g.Count())).ToArray(); }