Skip to content

CarlSeiler/markov-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markov Experiment

Introduction

This was created as an experiment for myself. I wanted to refresh my undestanding of Markov chains, and after watching the video by Omer Nevo at PyConIsrael I decided I would implement my own version in NodeJS.

Usage

Developed using NodeJS 10.15.1, but doesn't really use anything crazy, so it should work in most versions of NodeJS.

You can install using npm:

npm install

However, that is not necessary as there are no outside dependencies. This will only be helpful if you want to use eslint, which is used in development to clean up the code.

To run, just type:

node app.js

It will read from the input file input.txt by default. This can be changed by editing the value of the constant inputFile in the SETUP section. Alternatively, you can pass it as a parameter:

node app.js differentinputfile.txt

The resulting output is shown on console and is saved in output.txt. While some error-checking does happen, the app expects to be able to read and output these files.

Comments are welcome on the issues page. You're welcome to grab it and use it. Keep in mind, I'm a hobbyist and dabbler.

About

Generates text using Markov chain

Resources

License

Stars

Watchers

Forks

Packages

No packages published