kerlon5 / pos2tracery

Convert corpus to tracery grammar with a POS tagger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pos2tracery

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)

About

Convert corpus to tracery grammar with a POS tagger

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%