pos2tracery is a tool stemming from my NaNoGenMo 2017 Artbook Project it uses Dariusk's pos-js implementation of fasttag to create tracery grammars to take sentence forms from a corpus, but replace the parts of speech within them with other parts of speech from throughout the corpus.
install:
npm install -g pos2tracery
usage:
pos2tracery corpus.txt grammar.json
the output file is optional if you want the grammar to be printed to the screen
Merge 2 tracery grammars with
mergetracery grammar.json grammar2.json combined_output.json
this will combine the contents of both json files (avoiding duplicates)