Beispiel #1
0
        public void TriTest(string wordFilePath)
        {
            WordFileWrapper wfw   = new WordFileWrapper(wordFilePath);
            Tri             myTri = new Tri(wfw.GetAllWords());
            TriNavigator    nav   = myTri.GetNavigator();

            var x = 5;
        }
Beispiel #2
0
        public void TriTest(string wordFilePath)
        {
            WordFileWrapper wfw = new WordFileWrapper(wordFilePath);
            Tri myTri = new Tri(wfw.GetAllWords());
            TriNavigator nav = myTri.GetNavigator();

            var x = 5;
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }