Skip to content
Generate Markov chains from text file in PHP.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.txt
README.md
example.php
markov.php
tom_sawyer.txt

README.md

Generate Markov chain from source file of text or string.

Tom Sawyer in plain format included courtesy of The Project Gutenberg(http://www.gutenberg.org).

Getting Started

Run php -f example.php to see what output can look like

Example Usage

$file_path = dirname(__FILE__).'/tom_sawyer.txt';
echo Markov::instance($file_path)->generate(20);
You can’t perform that action at this time.