Exemplo n.º 1
0
        void PrepVocab()
        {
            StringReader reader;
            string       nextLine;

            reader = new StringReader(rawtext);

            while (true)
            {
                nextLine = reader.ReadLine();
                if (nextLine == null)
                {
                    break;
                }
                if (!nextLine.Contains(" "))
                {
                    VocabWord vocab;

                    vocab = new VocabWord(nextLine);
                    if (!vocabWords.ContainsKey(vocab.Self))                        //Original dictionary has at least one duplicate.
                    {
                        vocabWords.Add(vocab.Self, vocab);
                    }
                }
            }
            //WriteToFile (); //This writes a copy of all the vocab words back to a file. It takes forever, don't activate it without a reason.
        }
Exemplo n.º 2
0
        void PrepVocab()
        {
            StringReader reader;
            string nextLine;

            reader = new StringReader (rawtext);

            while (true) {
                nextLine = reader.ReadLine ();
                if (nextLine == null) {
                    break;
                }
                if (!nextLine.Contains (" ")) {
                    VocabWord vocab;

                    vocab = new VocabWord (nextLine);
                    if (!vocabWords.ContainsKey (vocab.Self)) { //Original dictionary has at least one duplicate.
                        vocabWords.Add (vocab.Self, vocab);
                    }
                }
            }
            //WriteToFile (); //This writes a copy of all the vocab words back to a file. It takes forever, don't activate it without a reason.
        }