Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including markov-cli with all npm packages installed. Try it out:

var markovCli = require("markov-cli")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

markov-cli v0.2.1

CLI to analyze text into a Markov Chain and generate sentences from them.

💬 Markov CLI

NPM version NPM downloads Build status Dependencies Coverage Status

CLI to analyze text into a Markov Chain and generate sentences from them.

💾 Installation

The package is on the NPM registry as markov-cli. Simply install it globally with your NPM client of choice.

🔧 Usage

Once installed globally, verify the command installed with markov-cli --help
There are two subcommands you can use:

analyze

Example usage: markov-cli analyze input.txt
Where input.txt is a file containing input strings, separated by newlines.

This will output a file named input.json with markov chain data for use in the next subcommand.

generate

Example usage: markov-cli generate input.json
Where input.json is a markov chain file generated by the analyze command.

This will output a string generated using the markov chain.

❤ Thanks

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free