Tracery: a story-grammar generation library for javascript
Switch branches/tags
Nothing to show
Clone or download
#6 Compare This branch is 28 commits ahead, 5 commits behind galaxykate:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore let's allow throwing errors! May 17, 2015 Update Feb 15, 2016
package.json added repository to package.json Nov 11, 2016
tracery.js readd eng modifiers Jan 26, 2016


Tracery: a story-grammar generation library for javascript

This is my attempt to package up Tracery as a Node library.


This is hosted at npm, so it can be installed like so:

$ npm install tracery-grammar --save

Example usage

var tracery = require('tracery-grammar');

var grammar = tracery.createGrammar({
  'animal': ['panda','fox','capybara','iguana'],
  'emotion': ['sad','happy','angry','jealous'],
  'origin':['I am #emotion.a# #animal#.'],



Sample output:

I am a happy iguana.
I am an angry fox.
I am a sad capybara.