Markov Text Generator

Brain dead after finals, I wrote a quick Markov chain text generator [Wikipedia, Wolfram Alpha] to output text similar to a sample set. I made some fake Darwin, Frost, Foucault, baboon research abstracts, and spam, which are posted below. Finally, I mix Darwin together with Foucault and add a dash of spam to the blend.

Charles Darwin

Here's the output based on Chapter 8 of Darwin's Origin of the Species, using a first order Markov chain:

I am inclined to diametrically opposite conclusions in constitution, more important, when used either at least tendency goes on the capacity of varieties as varieties. If we have failed to perfect fertility. It has observed the female, so easily than is a state of plants. We see this subject with N. glutinosa. Hence it harmonizes perfectly as varieties. He is rendered barren. On the remarkable fact, that mongrel plants. I think that hybrids thus argue in first crosses and that the same, whether or of one parent, a state of insect-agency by two species which is not made by so many botanists rank as yet very general, but not one species.

Things seem a bit more natural (though still wacky) when the program uses a second order Markov chain on the same input:

That it is with mongrels from a reciprocal cross. Both hybrids and mongrels can be more easily than other dogs with foxes, or that certain South American indigenous domestic dogs do not think that species have been reciprocally crossed. There is no essential distinction between varieties and species. First, for the pollen-tubes protrude, they do not seem to be a strange arrangement.

Robert Frost

Some poems of Robert Frost, mixed-up using a first-order Markov chain are still poetic:

Far in rain,
The only keeps the place's name.
No one acquainted with a field I left
and creeping Out over the rose It was dark.
To learn baseball,
Whose woods around
On Looking Up
by the world will not elves exactly,
and I'd ask him the sunset far from each the dead - How else?
They sent him off with his beat
And tossing so foolish as best it were,
held it was it, and in,
And say good-by;
And grew to it wouldn't think what good both that talks
of the cobwebs
Broken across it.

Michel Foucault

Here's a second-order Markov chain's interpretation of the first three chapters in Foucault's The Archaeology of Knowledge:

The problem is certainly a collection of the sudden irruption; in what they were calculated in relation between the most easily proved: statements (whether spoken in the order in prison (with its criteria of formation is not therefore to accept before any particular period to master time - and which, in the nineteenth century onwards - all these grids of ethical options, so much the decisions proper to see to consider those contemporary with such a fourth hypothesis to define a different forms of signs (signifying elements of them, to writing or repetition; which it might reconstitute another as identical in the one might expect, a blank, indifferent space, lacking attributable links can be situated at work; but opposite themes. The analysis of a quite different periods, and to Darwin? A novel by those ready-made syntheses, those contemporary research: indeed, the intrication of the discourse is to construct a field is this single object, in which the limits of rules, which, while dissipating their corrections and a reality and heterogeneous determinations, lacking in law, in short, is dealing is, in the material with it, which a voice as practices that may erase the same madmen.

Research Abstracts

I grabbed all available abstracts in PubMed that were returned for a search of the word "baboon." Here's the result of 1st-order Markov chain text generation:

The influence of human endothelium. EPCR and endogenous element of 8 pregnancies. During the 8 baboons (Papio papio). Restriction enzyme activity of light-adapted parasol ganglion of various intervals of the laboratory; however, very fast distribution of the p55 specific assessment revealed average of reperfusion increased metabolic secretory product (RPP), Delayed hypersensitivity response (TCR) and potassium-channel genes identified as the two groups before challenge: formalin-fixed previously reported on the virus-specific antigenic determinant formed two major fiber cells of the embryonic stem cell culture immunoreactive insulin of the viruses from each specimen. Young's modulus and low amplitude of HSPCs we find that they do not enhance fibrinogen demonstrated either alkaline phosphatase staining pattern was found that can be used for net output by acting very similar. The effects of kainic acid itself. However, sumatriptan may fulfill some immunological studies. We suggest other nonpathogenic infection in an anti-GFP antibody pretreatment with cyclosporine in the inert particles by deletion compared with highly homologous to the perirhinal and following toxin T-cell responses and the major pharmacological reports on 394 animals at different filler material in the overlying fingerprint. Although strong excitants of factors is a structure of vWF, VCAM-1, and MI survivors was observed in the most widely in uninfected laboratory and be modified the entire repeat) in hamadryad baboons. Article in earlier in one of action on more supraorbital bone segments into the research in mean airway pressure.

And another:

Oxytocin has developed. On day 110, with sickle-cell anemia resulting from a single molecular weight gain in the brain uptake values is restricted to fivefold above the primary feeding DL visual signals emitted was the relationship of Psychiatry and the colobine incisors of bone marrow that died at approximately 11 and experiments support the MSC due to the cerebrovascular CO2 reactivity against HVP died from 0.5 times the only moderately, by an impaired clearance and that splicing of the baboon.


Here's what happens when I let a first-order Markov chain loose on all the English spam in my Gmail account:

Elevate your way around from one game to me for you.
I am Mr Tadaaki Jagawa Chairman ,
I have a link.
Here it is.
Your Email Id has won One Million Pounds and a link.
Here it is.
Your Email Id has won One Million Pounds and cutting-edge graphics!
This casino downloads quickly, the next.
Await your urgent reply back to $800 on your interest.
Awaiting your way around from one game to me of VIP online gaming.
Dear Sir/madam,
I will give you notify me Holiday DISCOUNT.

All Together Now

What happens when you smoosh Darwin, Foucault, and spam together as input to a second-order Markov chain? Four-field anthropology, downloadable in full here:

We must question those ready-made syntheses, those groupings that purport to be repeated, known, forgotten, transformed, utterly erased, and hidden, far from referring to contents or representations) but as one looks at the level of discourse and the repetition of an astonishing fact. But it is not linked with synthesising operations of a group if they refer to one side for the sterility be innately variable in the exact specificity of its mother, and therefore when one species or varieties, with the parent-form. Now hybrids in the existence of a lexicon and an episode in a psychiatric hospital; and the oeuvre.


The relation between the statements that have already been sketched, instead of according them unqualified, spontaneous value, we must reconstitute another discourse, rediscover the silent murmuring, the inexhaustible speech that animates from within the egg or seed produced by two eminently capable judges, namely Mr Blyth and Capt. Hutton, that whole flocks of these dispersed and heterogeneous statements; the system that governs their division, the degree of sterility. Kolreuter makes the rule equally universal; and he consequently ranks them as undoubted species. If we were to act thus, and pair brothers and sisters in the progeny. Hence it seems to make two inverse and complementary observations. In one case, the name 'Mallarme' does not refer in the British NOKIA INC Promo 2011. send your Names.