Skip to content

Convert corpus to tracery grammar with a POS tagger

License

Notifications You must be signed in to change notification settings

kerlon5/pos2tracery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%