Exemplo n.º 1
0
        private IEnumerable <IdiomDetector.Result> LookAhead(Request request, int ahead = 5)
        {
            return(idiomDetector.Detect(Impl(request, ahead)));

            string Impl(Request r, int a)
            {
                return(string.Join("", r.SubsequentWords.Take(a)));
            }
        }
Exemplo n.º 2
0
        public void Basic()
        {
            var entries = idiomDetector.Detect("鼻の下");
            var result  = entries.First(e => e.DictionaryEntry.KanjiEntries.Select(k => k.Kanji).Contains("鼻の下を伸ばす"));

            CollectionAssert.AreEqual(new[]