@cute-engineer/markov
v0.0.3
Published
Naive & simple Markov chain implementation written in TypeScript.
Downloads
19
Readme
markov ⛓️
Naive & simple Markov chain implementation written in TypeScript.
Installation
Install locally or globally with:
npm install @cute-engineer/markov
# Or, globally
npm install -g @cute-engineer/markovUsage
There are two subcommands.
generate- To generate the database. This needs to be run first.
markov generate /path/to/folder/of/markdown/documentsThis will generate a file named database.json in your current directory.
step- This will step through the chain a given number of times, and output the result.
markov step <word> <count>For example, to generate the next 8 words after "JavaScript":
markov step JavaScript 8Generates an output that looks like:
docs en mozilla https for a to isDevelopment
- Install Nix and Direnv
direnv allownpm install
Off to the races 🏎️
