Пример #1
0
        static void WriteEdge(string word1, string word2, CONNECTION_TYPE type)
        {
            word1 = RemoveInterpunction(word1.ToLower());
            word2 = RemoveInterpunction(word2.ToLower());
            if (!dic.ContainsKey(word1))
            {
                dic[word1] = dicIndex++;
            }
            if (!dic.ContainsKey(word2))
            {
                dic[word2] = dicIndex++;
            }

            /* edges += dic[word1] + " ";
             *
             * edges += dic[word2] + " ";
             * edges += Array.IndexOf(Enum.GetValues(type.GetType()), type);
             * edges += Environment.NewLine;*/

            writer.Write(dic[word1] + " ");

            writer.Write(dic[word2] + " ");
            writer.WriteLine(Array.IndexOf(Enum.GetValues(type.GetType()), type));
            //  Console.ReadKey();
        }