Example #1
0
        public int GetRank(string word)
        {
            double x = 1;

            foreach (char c in word)
            {
                double freq = DictionaryHelper.GetCode(c).Freq;
                x += freq;
            }
            return((int)x);
        }
Example #2
0
 public override string GetDefaultCodeOfChar(char str)
 {
     return(DictionaryHelper.GetCode(str).Wubi98);
 }
Example #3
0
 public override IList <string> GetCodeOfChar(char str)
 {
     return(new List <string> {
         DictionaryHelper.GetCode(str).Wubi98
     });
 }
        public void TestGetCharCode(char c, string code)
        {
            var codes = DictionaryHelper.GetCode(c);

            Assert.AreEqual(codes.Wubi86, code);
        }
Example #5
0
 public virtual IList <string> GetAllCodesOfChar(char str)
 {
     return(new List <string> {
         DictionaryHelper.GetCode(str).Wubi86
     });
 }
Example #6
0
 public virtual string GetDefaultCodeOfChar(char str)
 {
     return(DictionaryHelper.GetCode(str).Wubi86);
 }
Example #7
0
 public static string GetWubi98Code(char c)
 {
     return(DictionaryHelper.GetCode(c).Wubi98);
 }