public Task <Option <RichFormatting> > Answer(Request request, CancellationToken token) { return(DictUtils.Lookup( request, t => dict.Lookup(t), r => GreedyLookup(r), kana)); }
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)); }