private static void PopCacheToWordDictionary(WordFrequencyResultSet result) { string word = result.CachOut().Trim().ToLower(); if (!string.IsNullOrEmpty(word)) { if (!result.WordDictionary.ContainsKey(word)) { int wordId = result.WordDictionary.Count + 1; result.WordDictionary.Add(word, new CategoryWordFrequency(wordId, new FoundWord(wordId, word), 1)); } else { result.WordDictionary[word].Hits++; } } result.ResetCache(); }