示例#1
0
        void BuildObjWordTable()
        {
            for (int i = 0; i < objTable.GetCount(); i++)
            {
                try
                {
                    List <int> l = new List <int>();

                    string   n     = objTable.objects[i].printedName;
                    string[] words = n.Split(' ');

                    for (int j = 0; j < words.Length; j++)
                    {
                        words[j] = words[j].ToUpper();
                    }

                    objWordTable.AddNewEntry(i, words.ToList <string>(), dictionary);
                }
                catch (Exception e)
                {
                    throw new Exception("Error creating object word table entry for object " + i);
                }
            }

            //add synonyms to objWordTable
            for (int i = 0; i < objTable.GetCount(); i++)
            {
                List <int> l = new List <int>();


                List <string> syns = new List <string>();

                foreach (string s in  objTable.objects[i].synonyms)
                {
                    syns.Add(s.ToUpper().Trim());
                }
                if (syns.Count > 0)
                {
                    objWordTable.AppendSynonyms(i, syns, dictionary);
                }
            }
        }
示例#2
0
        void BuildObjWordTable()
        {
            for (int i = 0; i < objTable.GetCount(); i++)
            {
                List <int> l = new List <int>();

                string   n     = objTable.objects[i].name;
                string[] words = n.Split(' ');

                for (int j = 0; j < words.Length; j++)
                {
                    words[j] = words[j].ToUpper();
                }

                objWordTable.AddNewEntry(i, words.ToList <string>(), dictionary);
            }

            //add synonyms to objWordTable
            for (int i = 0; i < objTable.GetCount(); i++)
            {
                List <int> l = new List <int>();


                List <string> syns = new List <string>();

                foreach (string s in  objTable.objects[i].synonyms)
                {
                    syns.Add(s.ToUpper().Trim());
                }
                if (syns.Count > 0)
                {
///                    objWordTable.AddNewEntry(i, syns, dictionary);
                    objWordTable.AppendSynonyms(i, syns, dictionary);
                }
            }
        }
示例#3
0
        void BuildObjWordTable()
        {
            for (int i = 0; i < objTable.GetCount(); i++)
            {
                List <int> l = new List <int>();

                string   n     = objTable.objects[i].name;
                string[] words = n.Split(' ');

                for (int j = 0; j < words.Length; j++)
                {
                    words[j] = words[j].ToUpper();
                }

                objWordTable.AddNewEntry(i, words.ToList <string>(), dictionary);
            }
        }