Tracery

Kate Compton’s contribution to last year’s ProcJam grew into a full-fledged JavaScript library with its own interactive tutorials. If you want to try out a recursive templating approach to generating text, this is a good place to start. 

The design intent was to make it easy to use, like Twine. It’s not quite at that stage, but it is an accessible way to begin playing around with procedurally generating text. If you’re looking for a way to participate in ProcJam or NaNoGenMo, this might be a good starting point.

The library: https://github.com/galaxykate/tracery
Interactive tutorial: http://www.crystalcodepalace.com/traceryTut.html
Research paper: https://www.aaai.org/ocs/index.php/INT/INT7/paper/viewFile/9266/9216