MARKOV3

Section: Games and Demos (6)
Updated: 3/6/87
Index Return to Main Contents
 

NAME

markov3 - Digest and spit out quasi-random Usenet articles  

SYNOPSIS

markov3 [ -pv ] [ -n n_articles ] [ -d dumpfile ] [ -s seed ] [ -x ] files  

DESCRIPTION

Markov3 digests Usenet articles and builds an internal data structure that models the articles as if they came from a random process, where each word is determined by the previous two. It then emits a series of articles on the standard output that have the same distribution of words, word pairs, and word triplets as do the input files. The name markov3 comes from the fact that this structure is called a Markov chain, and that the statistics for word triplets are modeled. Here, a "word" is a sequence of printable characters surrounded by whitespace. Paragraph breaks (blank lines) are also treated as a "word". Paragraphs of included text are treated as single "words" and printed as "> ...".

By default, the program expects to be fed Usenet articles; it strips off headers, included text, and signatures (or at least it tries). The -p (plain) option disables the header-stripping feature (otherwise everything is skipped until a blank line is encountered).

By default, 10 articles, separated by form feeds, are written on the standard output. The -n option lets you specify a different number.

The -x option does not seed the random number generator; this is useful for simulating people who repeat themselves.

The -d (dump) option dumps a representation of the internal data structure built by markov3 on the named file.

Finally, the -v (verbose) option prints some statistics on the standard error.  

CAVEATS

This program allocates lots of memory if given large amounts of input. On virtual memory systems, the paging behavior is atrocious because pointers tend to point every which way, and many pointers are dereferenced for every word processed. This could be improved, I'm sure.

Posting articles generated by markov3 to the net may be hazardous to your health.

Not as smart as Mark V. Shaney.  

PORTABILITY

An effort has been made to make this program as portable as possible; an earlier version was much less portable because of problems with null pointers and rand(3). Please let me know if you have further problems.

If you don't have lex, you'll need to rewrite the lexical analyzer but most of the program is in C.


 

Index

NAME
SYNOPSIS
DESCRIPTION
CAVEATS
PORTABILITY

This document was created by man2html, using the manual pages.
Time: 19:06:56 GMT, February 02, 2023