Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public override string GetDefaultCodeOfChar(char str)
 {
     return(DictionaryHelper.GetCode(str).Wubi98);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 public virtual IList <string> GetAllCodesOfChar(char str)
 {
     return(new List <string> {
         DictionaryHelper.GetCode(str).Wubi86
     });
 }
Ejemplo n.º 6
0
 public virtual string GetDefaultCodeOfChar(char str)
 {
     return(DictionaryHelper.GetCode(str).Wubi86);
 }
Ejemplo n.º 7
0
 public static string GetWubi98Code(char c)
 {
     return(DictionaryHelper.GetCode(c).Wubi98);
 }