是否有一个库(最好是在JavaScript但不是必需的),它接受一组日期时间对象并执行自然语言生成并生成一个人类可读的句子?
e.g。
["monday","tuesday","wednesday","thrusday","friday"] // "on weekdays"
[9,10,11,12,13,14] // "between 9am and 2pm"
它只需要用英语工作,但当然还需要额外的语言支持。
答案 0 :(得分:0)
找到一个C#库,它接受一个cron表达式并生成自然语言输出:https://github.com/bradyholt/cron-expression-descriptor
答案 1 :(得分:-1)
${coffee strings}
获取var并将值拉入句子
var name = “Bob” ;
var thing =“Party”;
var greet = ` hi my name is ${name} and I like to ${thing}!`;