3 ms·
I implemented this in PHP yesterday if anyone is interested: https://github.com/gburtini/Learning-Library-for-PHP/blob/master/lib/unsupervised/markovchain.php
by gburt 14y ago
I implemented this in PHP yesterday if anyone is interested:
https://github.com/gburtini/Learning-Library-for-PHP/blob/master/lib/unsupervised/markovchain.php https://github.com/gburtini/Learning-Library-for-PHP/blob/ma...
Edit: the thread above me is talking about bigram implementations, mine supports n-gram by setting the variable $degree when you train to anything you like. By default, its 1-gram.