0.0.2 • Published 4 years ago

mtext v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Usage

Once you've installed this package, you must procure training data for it. It trains really well on 10 KB+ files.

To start, construct a new markov chain:

const mtext = require("mtext")
const myChain = mtext("my cool text here")

Then, train the chain on the data you passed.

myChain.train()

Finally, generate text of any length:

// Generate text of 10000 words based of inputs
myChain.generateText(10000);