public void TriTest(string wordFilePath) { WordFileWrapper wfw = new WordFileWrapper(wordFilePath); Tri myTri = new Tri(wfw.GetAllWords()); TriNavigator nav = myTri.GetNavigator(); var x = 5; }
public void TriTest(string wordFilePath) { WordFileWrapper wfw = new WordFileWrapper(wordFilePath); Tri myTri = new Tri(wfw.GetAllWords()); TriNavigator nav = myTri.GetNavigator(); var x = 5; }
public void WordsInFile(string path_to_target_file, string path_to_file_containing_all_words) { byte[] buffer; using (FileStream fs = new FileStream(path_to_target_file, FileMode.Open)) { buffer = new byte[fs.Length]; fs.Read(buffer, 0, (int)fs.Length); } buffer = BufferUtils.RemoveNonAscii(buffer); char[] carr = BufferUtils.BytesToChars(buffer); WordFileWrapper wfw = new WordFileWrapper(path_to_file_containing_all_words); Tri tri = new Tri(wfw.GetAllWords()); HashSet<string> allWords = Algo.WordsInCharBuffer(carr, tri); Output(allWords); }
public void WordsInFile(string path_to_target_file, string path_to_file_containing_all_words) { byte[] buffer; using (FileStream fs = new FileStream(path_to_target_file, FileMode.Open)) { buffer = new byte[fs.Length]; fs.Read(buffer, 0, (int)fs.Length); } buffer = BufferUtils.RemoveNonAscii(buffer); char[] carr = BufferUtils.BytesToChars(buffer); WordFileWrapper wfw = new WordFileWrapper(path_to_file_containing_all_words); Tri tri = new Tri(wfw.GetAllWords()); HashSet <string> allWords = Algo.WordsInCharBuffer(carr, tri); Output(allWords); }