detrospector: Markov chain text generator

[ bsd3, natural-language-processing, program, text ] [ Propose Tags ]

The detrospector program generates random text conforming to the general style and diction of a given source document. It associates each k-character substring of the source document with a probability distribution for the next character. These distributions are used to iteratively pick new characters for output. In other words, it samples a Markov chain derived from the source document.

Run detrospector -? for usage information. The program has several modes. It can generate random text, or invent individual random words which are not found in a dictionary. These modes require a chain file, which is built from a source document in another mode.

Design goals include speed and full Unicode support. I welcome suggestions and patches regarding any aspect of this program.

New in version 0.2:

  • Use the unordered-containers library instead of hashmap. Also fixes a build failure.

  • Accept -h for help, in addition to -?.

  • Added public GitHub repository.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.1, 0.2, 0.3
Dependencies base (>=3 && <5), binary (>=0.5), bytestring (>=0.9), cmdargs (>=0.6), containers (>=0.3), hashable (>=1.0), mwc-random (>=0.8), text (>=0.8), unordered-containers (>=0.1), zlib (>=0.5) [details]
License BSD-3-Clause
Author Keegan McAllister <>
Maintainer Keegan McAllister <>
Category Text, Natural Language Processing
Source repo head: git clone git://
Uploaded by KeeganMcAllister at 2012-01-29T04:04:33Z
Reverse Dependencies 1 direct, 0 indirect [details]
Executables detrospector
Downloads 2880 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-25 [all 7 reports]

Readme for detrospector-0.2

[back to package description]
detrospector is a Markov chain text generator.

See detrospector.cabal for more information, as well as