Skip to content

Create, update and run Markov chain models for text generation

License

Notifications You must be signed in to change notification settings

hexacta/markov-chain

Repository files navigation

markov-chain Build Status npm version XO code style

Create, update and run Markov chain models for text generation.

Install

$ npm install --save hx-markov-chain

Usage

const markov = require("hx-markov-chain");
const model = markov.create();
markov.update(model, ["a", "b", "c"]);
markov.update(model, ["a", "c", "d"]);
const chain = markov.run(model);

API

markov.create()

markov.update(model, chain)

markov.run(model)

License

MIT © Hexacta