Ejemplo n.º 1
0
        public SentenceCompareResult TestSentence(SingleCharInputMethod method, string sentense, IEnumerable <string> pinyins)
        {
            string result = "";

            try
            {
                method.Clear();
                foreach (var pinyin in pinyins)
                {
                    method.Input(pinyin);
                }
                result = method.Results.First();
            }
            catch (InvalidOperationException e)
            {
                Console.WriteLine(e.Message);
                result = method.NowBestAnswer;
            }
            return(new SentenceCompareResult(sentense, result));
        }
Ejemplo n.º 2
0
 public void Add(SingleCharInputMethod method, SentenceCompareResult result)
 {
     Results.Add(result);
 }
Ejemplo n.º 3
0
 public void Add(SingleCharInputMethod method, string result)
 {
     Results.Add(new SentenceCompareResult(Std, result));
 }