Skip to content

The Cento Generator

December 15, 2009

A cento is a sort of collage poem, composed from pieces of other poems. Done right, it becomes an interesting reflection on its component parts rather than simply an instance of multiple plagiarism: one might adduce things like The Waste Land, which, while not actually a cento, is famous/notorious (take your pick) for the number of fragments of other things pasted into it.

So I’m learning Python (anything rather than buckle down to the two essays and exam revision I should be doing) and, having successfully engineered programs to make the computer solve quadratic equations and play very basic D&D, I decided it was time to move on to other reaches of geekdom and teach it poetry.

Hence the Cento Generator.

When in disgrace with Fortune and men’s eyes
they did not stop to think they died instead
Then felt I like some watcher of the skies …

The generator holds, at present, around 500 lines of iambic pentameter, sorted by rhyme. (I’ve been sat with Poems on the Underground all afternoon, adding more.) It contains the dissected remains of poems by Shakespeare, Milton, Donne, Drayton, Herrick, Wordsworth, Keats, Auden, Pope, cummings, Clare, Carol Ann Duffy, Elizabeth Bishop, Edna St Vincent Millay, Dylan Thomas, and probably a few more I’ve forgotten. Even before it starts being recombined, the database is an extraordinary testimony to the versatility of the pentametric line and of the poets who’ve used it. It’s been the lifeblood of English verse for half a millennium, and it’s amazing how well bits from opposite ends of that massive timespan stitch together.

It currently supports the generation of quatrains in three rhyme-schemes, two sorts of sonnet, ballades, villanelles, and terza rima. I will probably add rhyme royal, ottava rima, the Venus and Adonis stanza, and assorted other forms at some later date. For now, I want to tidy up the code (it stands at an appalling 1059 lines; I can probably lose at least a hundred) and keep adding to the database, to stop the same combinations turning up again and again.

Like with TranslationParty (indeed like with everything if we’re going to be philosophical), the rubbish-to-awesome ratio is incredibly high. However, like with TranslationParty, when it turns up gems it does so with a vengeance.

So far I haven’t yet generated an entire poem that made complete sense, but what does seem to be happening is that I’m getting clumps of three to six lines where the grammar – and sometimes sense – hangs together in a disconcerting, even spooky manner. To be reading through stanzas of drivel and then to suddenly reach a vein of lucidity is a bizarre experience and one quite alien to general literary procedure, but oddly thrilling nonetheless. I’m not a student of Modernism (Seamus?) but it seems to me to have something in common both with the cut-and-past-y approach taken by Eliot and Pound, and also with the work of the French Oulipo collective (Ouvroir de Litterature Potentielle, if I recall rightly – the Workshop for Potential Literature).

It may seem bizarre to go from recombinant poetry (noncontroversial, cared about only by geeks) to evolution vs. creationism (very controversial, cared about by geeks and anti-geeks alike) with no step in between, but bear with me. The crucial difference between the Modernists and the Cento Generator is that here, it’s random chance (or the nearest thing to it gettable without exceedingly complex equipment) doing the rearranging, rather than an editorial eye; it’s the proverbial million monkeys scenario. And yet the torrents of ungoverned, unmitigated crap this turns out still include the occasional scrap of sense, even scraps that exude spooky rightness, as if they had to have been put together that way … but they weren’t.

(I do not want to start an argument over whether evolution exists, because to my mind it’d be like starting an argument over whether gravity exists or whether God reaches out His mighty hand to pull every dropped object downwards. I’m an atheist agnostic, but even from a religious point of view (which I had for a while), leaving God in the worldview does not require that He (She, It, They, etc.) personally oversee every damn thing. Gods are allowed to delegate same as anyone else.)

‘Irreducible complexity’ is an argument regularly brought forward against evolution. It’s basically the argument that some things are so a) complicated and b) perfectly suited to their purpose that they must have been designed. And it’s bullshit. Nature works like the Cento Generator: by generating reams upon reams of rubbish every generation, for the sake of the one piece that works. She’ll happily work 999,999 metaphorical monkeys to death in order for the other one to produce Hamlet. ‘Red in tooth and claw’ is the phrase Tennyson coined, writing just before Darwin, and it is rather horribly apt.

Here, for your delectation, are the few happy mutant poems that managed to survive the fearsome natural force that is the Delete key. Some are beautiful, some are funny, some are really weird. Some probably only make sense because I’ve been staring at a screen for the entire day. Obviously some lines come up multiple times. A few closing punctuation marks have been changed, generally just to make the quoted pieces end on a full stop.

A word of warning: these are fragments. Two whole poems that seemed keep-worthy in their entirety have been relegated to another post, here, because this post is already 1200 words long.

And so.

Some realms I owned, two rivers, a continent,
The tigers in the panel that she made.
Nor shall Death brag thou wand’rest in his shade,
Of lost door keys, the hour badly spent.

Some days, although we cannot pray, a prayer;
Thou art slave to chance, fate, kings and desperate men,
The beauty of the morning; silent, bare,
And better than thy stroke; why swell’st thou then?

Then felt I like some watcher of the skies
If we should weep when clowns put on their show,
Scribbling on the sky the message He Is Dead.

For this, for every thing, we are out of tune;
I write of Hell; I sing (and ever shall),
This Sea that bares her bosom to the moon;
Of Heaven, and hope to have it after all;

Of Balm, of Oil, of Spice and Amber-Greece,
And risk it on one turn of pitch-and-toss.
I sing of Dews, of Rains, and piece by piece
Console the lodger looking out across.

So might I, standing on this pleasant lea,
Bring out the coffin, let the mourners come.
And risk it on one turn of pitch-and-toss,
And never breathe a word about your loss.

Since there’s no help, come let us kiss and part,
If you can force your heart and nerve and sinew
And so hold on when there is nothing in you,
And I am glad, yea, glad with all my heart.

The following bits came from the same iteration. I almost quoted the whole thing in full, but decided against it.

Time only knows the price we have to pay,
If we should stumble when musicians play.
I sing of Times trans-shifting; and I write
And all the brooks and soldiers run away.

and my favourite:

Because I love you more than I can say,
There must be reasons why the leaves decay;
I love thee to the depth and breadth and height
The lone and level sands stretch far away.

Advertisements
4 Comments leave one →
  1. Seamus permalink
    December 15, 2009 5:19 pm

    You called me, und ich komme.

    Before I say anything more constructive, let me just register this jubilant cheer — WAHEEEEY — for the presence of Elizabeth Bishop in your strange machine. I haven’t read anything of hers since sixth form, but those two lines from “One Art” up there in the first example brought back how fondly I read her then. I shall be picking up a collection of her in the library later.

    Now then: first of all, the Modernists, since you mention my name in that paragraph. Not only does the cento recall The Waste Land in its form (indeed one might call it an even more austere version of the decentred approach Eliot took in that poem, since it removes the composer’s individual voice entirely); your description of the experience of reading a computer-generated cento perfectly mirrors most readers’ first encounter with that poem.

    “To be reading through stanzas of drivel and then to suddenly reach a vein of lucidity is quite bizarre,” you say, and while I would in no way call any of The Waste Land “drivel” (now that I’ve learned to love it), that is nevertheless the feeling created in me by my first reading of lines like this:

    London bridge is falling down falling down falling down

    Poi s’ascose nel foco che gli affina
    Quando fiam ceu chelidon — O swallow swallow
    Le Prince d’Aquitaine a la tour abolie
    These fragments I have shored against my ruins

    The latter line there suddenly brings you back to full speed again. One often finds the same thing with Pound. Both poets like to pull sudden clarity out of confusion.

    Those last two bits are the best of all. I agree with you on the final one, but I love the phrase “I write/And all the brooks and soldiers run away”, as well. The watcher of the skies, weeping when clowns put on their show, into He Is Dead, all fits together astonishingly well.

    I’m going to go on to the other post now, and see what’s there. By the way, do you have any way of sending me the program such that I could run it on my computer?

  2. wickedday permalink
    December 15, 2009 11:15 pm

    “to pull sudden clarity out of confusion” – Yes. This. You said it a great deal more elegantly than I did.

    I do wonder whether Eliot, or Pound or someone, would have taken advantage of computerised randomisation, had it been readily available. Or maybe it’d be more like the automatic-writing school, as you say.

    In either case I think it’s now only a matter of time before some enterprising geek-poet writes a program full of fragments, which produces a different recombinant poem each time you click, and markets that as ‘interactive poetry’. We’ve already got art installations and theatre where the act of audience changes the performance, so why not do the same to literature?

    As to exporting the program – I’m pretty sure it can be done, just haven’t quite worked out how yet.

  3. Seamus permalink
    December 17, 2009 1:34 am

    Please hasten to find a way, if a way there is. I am quite desperate to have this thing to play with. If it’s a case of me downloading my own Python client and you simply sending me the code (does it work like that?), I would be perfectly happy, particularly if you can tell me how to add lines of my own to the database (I want to throw Fleur Adcock and Louis MacNeice into the mix, for starters).

Trackbacks

  1. “The Bard” and “A Requiem” « This Wicked Day

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s