markov-catena

1.0.0 • Public • Published

markov-catena

String generator based on Markov process

Installation

npm install markov-catena

Simple example

import  from 'markov-catena'
// or const mс = require('markov-catena')

const generator = new .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

Features

  • Easy to use
  • Result validating (also built-in validators TODO).
  • Result formatting (also built-in formatters). Example

Package Sidebar

Install

npm i markov-catena

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

94.9 kB

Total Files

9

Last publish

Collaborators

  • jarvis394