String generator based on Markov process
npm install markov-catena
import mс from 'markov-catena'
// or const mс = require('markov-catena')
const generator = new mс.StringGenerator(['hello, world', 'world is mine'])
for (let _ in [...Array(5)]) console.log(generator.generateString())
// will generate something like:
//
// 'hello, world'
// 'world'
// 'hello, world is mine'
// 'world'
// 'hello, world'
More examples can be found here
- Easy to use
- Result validating (also built-in validators).
- Result formatting (also built-in formatters). Example