public void FillDict(string text) { dictionary = new TwoThreeTree <string>(); foreach (var word in Regex.Split(text, @"\W+")) { dictionary.Insert(word); } }
public void CheckText(string text) { foreach (var word in Regex.Split(text, @"\W+")) { if (dictionary.SearchWithOneMistake(dictionary.Root, word)) { Console.WriteLine("Ошибка в слове: " + word); } else { dictionary.Insert(word); } } }