public IEnumerable <Dictionary <string, double> > MakeKasiskiMethod([FromBody] KasiskiParams args) { return(servie.GetKasiskiResult(args.Text, args.Alphabet).Select(tpl => new Dictionary <string, double>() { { "size", tpl.Item1 }, { "probability", tpl.Item2 } })); }
public IEnumerable <string> GetKeyword([FromBody] KasiskiParams args) { var frequencyDict = args.Alphabet.Zip(args.Frequency, (key, val) => (key: key, val: val)).ToDictionary(p => p.key, p => p.val); return(servie.GetKeywords(args.Text, frequencyDict, args.Length)); }