markov-chain

Markov Chains for generating random sequences with a user definable behaviour.

http://code.haskell.org/~thielema/markov-chain/

Version on this page:0.0.3.4
LTS Haskell 22.43:0.0.3.4@rev:1
Stackage Nightly 2024-12-05:0.0.3.4@rev:1
Latest on Hackage:0.0.3.4@rev:1

See all snapshots markov-chain appears in

LicenseRef-GPL licensed and maintained by Henning Thielemann
This version can be pinned in stack with:markov-chain-0.0.3.4@sha256:69609e3dda1fbe220cf164098f5878290f5522e1fa5d7b6cf7f22d59ffacb175,2049

Module documentation for 0.0.3.4

This library can be used to generate random sequences of anything with a behaviour that is adapted to some training data. Input a marketing text or a speech and recompose it to another arbitrary text of this sort. Input a dictionary of person names and create new names. Input a sequence of notes and get out a new melody. Input a set of Haskell modules and generate ... nice idea but the result will certainly have neither correct syntax nor types. I think, it's a good thing about Haskell, that you cannot fool it so easily. The idea is very simple: The algorithm analyses your input/training data with respect to how likely an a or e follows the letters r and e. Then on recomposition it chooses subsequent letters randomly according to the frequencies found in the training data. This library is well suited for bull-shit generators.