Exemplo n.º 1
0
        public void Init(string str, WordDictionary wd)
        {
            string sp = @"\s+";

            string[] doc = Regex.Split(str, sp);
            Words  = new int[doc.Length];
            Length = doc.Length;
            for (int i = 0; i < Length; i++)
            {
                Words[i] = wd.GetWords(doc[i]);
            }
        }
Exemplo n.º 2
0
 public void Init(string str, WordDictionary WD)
 {
     try
     {
         string   sp  = @"\s+";
         string[] doc = Regex.Split(str, sp);
         Words  = new int[doc.Length];
         Length = doc.Length;
         for (int i = 0; i < Length; i++)
         {
             Words[i] = WD.GetWords(doc[i]);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }