示例#1
0
 public Task <Option <RichFormatting> > Answer(Request request, CancellationToken token)
 {
     return(DictUtils.Lookup(
                request,
                t => dict.Lookup(t),
                r => GreedyLookup(r),
                kana));
 }
示例#2
0
        private (IEnumerable <YomichanTermDictionary.Entry> entry, string word) GreedyLookup(Request request, int backOffCountStart = 5)
        {
            if (request.SubsequentWords == null)
            {
                return(null, null);
            }

            return(DictUtils.GreedyLookup(s => dict.Lookup(s), request.SubsequentWords, backOffCountStart));
        }