Natural language generation for time objects

119 Views Asked by At

Is there a library (preferably in JavaScript but not required) that takes an array of datetime objects and perform natural language generation and produce a human readable sentence?

e.g.

["monday","tuesday","wednesday","thrusday","friday"] // "on weekdays"
[9,10,11,12,13,14] // "between 9am and 2pm"

It only need to work in English, but of course additional language support would be preferred.

1

There are 1 best solutions below

0
On

Found a C# library that takes a cron expression and generate the natural language output: https://github.com/bradyholt/cron-expression-descriptor