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)); }
public void Add(SingleCharInputMethod method, SentenceCompareResult result) { Results.Add(result); }
public void Add(SingleCharInputMethod method, string result) { Results.Add(new SentenceCompareResult(Std, result)); }