Algorithm::MarkovChain - Object oriented Markov chain generator
use Algorithm::MarkovChain; my $chain = Algorithm::MarkovChain::->new(); # learn about things from @symbols $chain->seed(symbols => \@symbols, longest => 6); # attempt to tell me something about the sky my @newness = $chain->spew(length => 20, complete => [ qw( the sky is ) ]);
perl Build.PL perl Build test
and if all goes well
perl Build install
What changed over the last 3 revisions
Fix for rt.cpan.org #6259 Converted to Module::Build
- change in spew behavior, prevents infinite loops in the case that a chainset is self-referential
- test for existence of chains in spew to prevent looping
Richard Clamp <richardc@unixbeard.net>
perl(1).
To install Algorithm::MarkovChain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Algorithm::MarkovChain
CPAN shell
perl -MCPAN -e shell install Algorithm::MarkovChain
For more information on module installation, please visit the detailed CPAN module installation guide.