Пример #1
0
        public static void ImportQueries()
        {
            StreamReader sr = new StreamReader("Queries.txt");
            string       line, s;

            string[] words;
            ulong    w;

            while ((line = sr.ReadLine()) != null)
            {
                words = line.Split(',');
                w     = ulong.Parse(words[0]);
                s     = words[1].ToLower();
                Query q = new Query(s, w);
                myQueries.Add(q);
                t.InsertQueries(w, s);
            }
        }
Пример #2
0
        public static void ImportQueries()
        {
            StreamReader sr = new StreamReader("Queries.txt");
            string       line, s;

            string[] words;
            int      w;

            while ((line = sr.ReadLine()) != null)
            {
                words = line.Split(',');
                w     = int.Parse(words[0]);
                s     = words[1].ToLower();
                foreach (string ss in words[1].Split(' '))
                {
                    if (!myDictionary.Contains(ss))
                    {
                        myDictionary.Add(ss.ToLower());
                    }
                }
                t.InsertQueries(w, s);
            }
        }