| Algorithm-MarkovChain documentation | view source | Contained in the Algorithm-MarkovChain distribution. |
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).
| Algorithm-MarkovChain documentation | view source | Contained in the Algorithm-MarkovChain distribution. |