Skip to content

Instantly share code, notes, and snippets.

@jpf
Created December 9, 2016 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpf/70af2b840dfa0152c95d0c1cc670c9a2 to your computer and use it in GitHub Desktop.
Save jpf/70af2b840dfa0152c95d0c1cc670c9a2 to your computer and use it in GitHub Desktop.
var tracery = require('tracery-grammar'); // https://github.com/v21/tracery
var grammar = tracery.createGrammar({
'aas': ['#thing# as a service.'],
'thing': [
'Chaos',
'Denial of Service',
'Insurrection',
'Monday',
'Sucks',
'apocalypse',
'as a Service',
'disillusionment',
'distraction',
'dongles',
'escape',
'everything is really bad,',
'incompetence',
'not another software',
'surveillance',
'unavailability',
]
});
grammar.addModifiers(tracery.baseEngModifiers);
console.log(grammar.flatten('#aas#'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment