Open Source Programmable Poetry

This is the input that is supposed to show my modified version of Nick Montfort’s Taroko Gorge / Scott Rettberg’s Tokyo Garage:

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=utf-8″>
<style type=”text/css”>
/* <![CDATA[ */
body {
background: #011;
color: #dad;
margin: 0 30pt 0 30pt;
font-family: Optima, sans-serif;
font-size: 24pt;
}
div {
height: 20pt;
}
a {
color: #007;
text-decoration: none;
}
/* ]]> */
</style>
<script language=”JavaScript” type=”text/javascript”>
var t=0;
var n=0;
var paths=0;
var above=’brow,mist,shape,layer,cliff,tray,forest,height’.split(‘,’);
var below=’flow,meander,shape,vein,rippling,stone,stove,clock’.split(‘,’);
var trans=’command,pace,roam,trail,frame,sweep,exercise,range’.split(‘,’);
var imper=’trace,shade,translate,stamp,go through,direct,run,enter’;
imper=imper.split(‘,’);
var intrans=’linger,dwell,rest,relax,hold,dream,hum’.split(‘,’);
var s=’s,’.split(‘,’);
var texture=’rough,fine’.split(‘,’);
function rand_range(max) {
return Math.floor(Math.random()*(max+1));
}
function choose(array) {
return array[rand_range(array.length-1)];
}
function path() {
var p=rand_range(1);
var words=choose(above);
if ((words==’forest’)&&(rand_range(3)==1)) {
words=’DONKEYS ‘+choose(trans);
} else {
words+=s[p]+’ ‘+choose(trans)+s[(p+1)%2];
}
words+=’ the ‘+choose(below)+choose(s)+’.’;
return words;
}
function site() {
var words=”;
if (rand_range(2)==1) {
words+=choose(above);
} else {
words+=choose(below);
}
words+=’s ‘+choose(intrans)+’.’;
return words;
}
function cave() {
var adjs=(‘encompassing,’+choose(texture)+’,sinuous,straight,objective,arched,cool,clear,dim,driven’).split(‘,’);
var target=1+rand_range(3);
while (adjs.length>target) {
adjs.splice(rand_range(adjs.length),1);
}
var words=’\u00a0\u00a0’+choose(imper)+’ the ‘+adjs.join(‘ ‘)+’ \u2014′;
return words;
}
function do_line() {
var main=document.getElementById(‘main’);
if (t<=25) {
t+=1;
} else {
main.removeChild(document.getElementById(‘main’).firstChild);
}
if (n===0) {
text=’ ‘;
} else if (n==1) {
paths=2+rand_range(2);
text=path();
} else if (n<paths) {
text=site();
} else if (n==paths) {
text=path();
} else if (n==paths+1) {
text=’ ‘;
} else if (n==paths+2) {
text=cave();
} else {
text=’ ‘;
n=0;
}
n+=1;
text=text.substring(0,1).toUpperCase()+text.substring(1,text.length);
last=document.createElement(‘div’);
last.appendChild(document.createTextNode(text));
main.appendChild(last);
}
function poem() {
setInterval(do_line, 1200);
}
</script>
<title>Modified Programmable Poetry</title>
</head>
<body onload=”poem()”>
<div style=”float:right; margin-top:12px; color:#0b3; height:60pt”>
<div>based on Taroko Gorge</div>
<div><a href=”http://nickm.com”>Nick Montfort</a></div>    </div>
<div id=”main”></div>
</body>
</html>

It might not look like anything now, but I’m still working on obtaining Python so I can modify the code and view it / further edit it for the final cut. Thank you for your patience…

Tasty Serial Poetry

Using the Charles O. Hartman PyProse program,I have uploaded PyProse output here in order to craft a serial poem. One line of PyProse generated per day gave me the following:

Day 1.  Some equations solved weekly; and even spread since so underdone a veal nodded, the afternoons between supper and the audience accountted for your mates, yet you rose to report to muffins under my own killswitch.

Day 2.  You traveled these bed bars: soft cloth enterprises with attitude.

Day 3.  The eastern science grinned, as products (the things) orbited that vending machine.

Day 4.  The conclusion of charm had sold them foods between conversation, the water damaged this and destroyed feelings of talkative talk.

Day 5.  Before evil forces worm out of this shelter, when we had squares landing in stables of consciousness?

Day 6.  This person spoke of a wasted army, and the electrons of darkness between the mechanical hutch caused furies to burn, rather curiosily, this elephant is dreaming.

Day 7. To worry is comforting, but What are you doing? Dominating worlds and forgetting to sleep?

Then I rearranged it to look like poetic verse:

Title: A Curious Equation Muffin

Some equations
solved weekly;
and even spread
since so underdone
a veal nodded,
the afternoons between supper
the audience accounted for
your mates, yet you
rose to report to
muffins under my own killswitch.

You traveled these bed bars:
soft cloth enterprises with attitude.

The eastern science grinned,
as products (the things)
orbited that vending machine.

The conclusion of charm had sold them
foods between conversation,
the water
damaged this
and destroyed feelings
of talkative talk.

Before evil forces
worm out of this
shelter, where we had
squares landing in stables
of consciousness?

This person
spoke of a wasted army,
and the electrons of darkness
between the mechanical hutch caused
furies to burn, rather curiosily
this elephant is dreaming.

To worry is comforting,
but what are you doing?

Dominating worlds and
forgetting to sleep?

Text Generators: Analysis and Critique (What’s Out There Anyway?)

As I was reading Antonio Roque’s “Language Technology Enables a Poetics of Interactive Generation”, I found it nearly overwhelming to digest the numerous historically significant attempts to create randomized text generator technology in order to incorporate these into poetic practices.  From the examples that Roque gives, I have tried Gnoetry in the past, but I wanted to try one of the samples that you (Dr.K) listed on the mainpage, so I visited various links to see which text generator would be best suited for my creative preferences.
I used Language is a Virus: Poetry Generator, The Cosmic Muse Poetry Generator, The Instant Muse, Oulipoems, DADA Server and Charles Hartman’s PyProse.

I also tried the Haiku-o-Matic. which creates randomized haikus based on user input or existing phrases.  The haikus are usually terrible and rarely make any sense.  However, the end-results do provide a bit of comic relief such as this questionable haiku:

spongebarb squarepanties
who now makes a slapping sound
Street Walker Barbie

Or these two other “fine” examples:
I strip to my shorts
I still will not dance for you
Welcome to New York

I’m eating breakfast
Slinking away from the ghosts
Why can’t I say “Hi”?

In any case, after interacting with these poetry / text generators, I was greatly entertained by the unusual phrases and surprisingly creative output.  I saved a few of the output pieces from Haiku-o-Matic,The Electronic Muse and PyProse to use for poetry of my own in the future.
A few key phrases from PyProse that I enjoyed were:

  • the electrons of darkness between the mechanical hutch caused furies to burn, rather curiously.
  • To worry is comforting, but what are you doing? Dominating worlds and forgetting to sleep?
  • the water damaged this and destroyed feelings of talkative talk.

It’s amusing to me how these text generators seem like an electronic version of throwing words from the dictionary into separate containers labeled nouns (subject), verbs, nouns (direct/indirect object) – then shaking these containers and randomly choosing one word from each to make phrases.  Not to be over-simplistic, but poetry generators are really just cleverly rigged random text generators that are not so random (subjectively) since there is always a database with a list of text or phrases to draw these output phrases from.

Perhaps that is an oversimplified notion of the text generator…in some cases like Haiku-o-Matic, the random phrases are not so random as we think since there is still the constraint of having the 5-7-5 syllable construction that is typical of a classic haiku.   Other generators, like the Cosmic Muse, create more nonsense than “sense” such as this output phrase: “In the kettle of perfection the abstractions wave,”

So, we can count on text generators to create some sort of ‘textual activity’ but it will not always make 100% sense to us (as humans) in the traditional way of understanding sentence structure since the generators follow a program / code / computer language (input) to create the output, and there is no program that can illicit a nonsense/sense function in a computer program (yet).

These assorted poetry / text generators are a great supplementary tool for poets and writers alike especially when the poet’s / writer’s block epidemic hits.  The generator program cannot exactly replace the poet or writer, but it can assist them by providing a creative phrase or conjuring up a mental image from the unique output that is generated.  That creative assistance would be one of the strengths of poetry / text generators.

As Roque says on page 11,

“Poetry generation tends to break down the traditional distinctions between poetry, poet, publisher, distributor, and audience.  A poet may be one who modifies an existing poem, who develops a new way of authoring poems, who programs and distributes a generator, or who masters an existing generator. An audience member may be one who uses a poetry generator and distributes the output. A poem can be “re-mixed” as part of an authoring process or used to build a language model for interactive generation and become a co-author of sorts.
These are exciting realities for practitioners of poetry generation and suggest a number of productive interactions…”

If we address how random text generators function as a creative writing tool, they can be used as a supplemental literary brainstorming device to the actual writer or poet.  In other words, the “strength” of the text generator still relies on the human factor: the person that created the generator, the person interacting with the generator, and the audience of the generated output.  The random text generator is not a stand-alone “machine”; it requires input, human interaction and participation (at a certain level) in order to generate words, and it still needs a database of words to draw the output from.

Much like sending a trained monkey to choose word cubes out of several hats (ones with nouns, verbs, adjectives…you get the idea), you still need someone to make the word cubes, and have someone to train the monkeys (you need more than one trained monkey to have more randomized word cube selection) before it can choose the word cubes.  On the same token, someone will have to keep sending these trained monkeys to continue choosing the word cubes, an action which is similar to pressing the “Generate” or “Submit” button on the poetry generator page.  Hence, the more trained monkeys you have choosing word cubes out of the hats and with more hats, you are now dealing with numerous data fields and you will have a larger variation of output content.

As a multimedia poet, creative writer, and artist, these random text generators are highly intriguing since there are many ways one can interact with the text and the generator itself– from programming your own generator, to using the output to create your own work, to even using the words to accompany drawings or photos, there is a lot of creative potential within the realm of generated text.

Poetry generators are a personal choice; you will either love them and be amused with the randomized output of words that few people would create themselves OR you will hate the nonsensical value of them because you can’t understand the output and have a lack of appreciation for such cyber-generated textual art.  Poetry generators – their beauty is in the eye of the beholder.(in this case, it’s in the comprehension of the reader…because if the reader of the generated poetry lacks appreciation for the output of the programming, then the textual content is not ‘beautiful’ enough in their eyes. Thus, computer generated poetry often falls upon ‘deaf’ eyes.)