These programs generate random text in the same style as some existing text supplied as an input.

You can download version 1.0 of the software which is covered by the GPL.

The README file is below.


'marcomp' and 'margen'

Copyright (C) 1999  Richard P. Curnow


INTRODUCTION
============

These programs implement a Markov source model for generating random
pieces of text in the style of a particular work.

marcomp reads the input file and creates a state/transition file.
This file contains information about how often a particular character
follows a sequence of preceding characters.  margen reads the
state/transition file and uses a random number generator to produce
characters obeying the frequency information in the file.

Three modes are supported : continuous text, sentence and dictionary.
Continuous text mode treats the whole file as a unit, and includes
transitions on all whitespace characters (unless -x is specified, in
which case line feeds are stripped and runs of whitespace compress to
a single space).  The end of file transitions through '\n' back to the
start of the file.  Sentence mode treats each sentence (delineated by
! or .) as a unit, and ignores line feeds in the input.  Each end of
sentence transitions to the initial state through '\n'.  Dictionary
mode treats lines of input as units (i.e. the input should contain 1
word per line, like /usr/dict/words.).  This similarly transitions
through `\n' back to the initial state at the end of a line.

See also the comments at the top of the marcomp.c and margen.c source
files.

EXAMPLES
========

To show what the software does, here's a play on the GPL, extracted
(and reformatted) from the output of the following command :

./marcomp -c 5 -x -r COPYING | ./margen -w 72 -st | more

To do one of any works based on the same places to Your New Program
`Gnomovision 2 of this License whole which is covered by someone else
grants you (whether by patent must make this License any later
versions understands intended that version", you use may not
distribute and ours, we want to these requirement.)

The act of this License any third parties are detail to accept this
sections, and modification and copy and conditions; type `show c';
they know you if you may add an explicit geographical distribute the
Program `Gnomovision version conditions either language.

(Hereinafter, translated so on) of the software is a subroutine line
to attach them as such claims or other source code distribute copies
other system; it is to copy, modified by the best way you redistribute
the Program (or else any other work under that any parties whose
sections as published by the executable under this section of a whole
which is intended that redistributed (in either work based on it,
whether by could have made by third parties to copyright holder saying
to free use may copyright notice that everyone under these countries,
so the Free Software.