Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 349 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 349 Bytes

markov-php

Simple markov chain implementation for PHP.

Example usage

<?php
include("Markov.class.php");
$chain = new Markov;

$chain->train("This is a test, a very simple test that we can use to do things.");
$chain->train("Another test is this.");
$chain->train("Maybe we should keep it simple.");

echo $chain->generateText(5);