When I first started programming, both I and a brother-in-law worked for AT&T. This was back in the days before all the local phone networks got spun off into their own companies — when the entire US phone network was called, collectively, “the Bell System.”
My brother-in-law, whom I will here call The BiL, was at the time an electrical engineer. As such, he too knew some things about programming. Like me, he also had (has) a flair for, umm, let’s say for an anarchic sort of jokes. And so we entertained ourselves for a brief time with a a thought experiment: an idea for a proposed software package, never built, which we called “BellPorn.” (In the post below, rather than use the actual P-word and attract all manner of unseemly traffic, I will indicate it thusly: p*graphy.)
It was a simple idea, or so it seemed:
- Start with the premise that the English language has a fairly finite set of basic sentence patterns. (Which is more or less true. This site, for example, says there are ten.) These sentence patterns are made up of varying combinations of parts of speech — noun phrases, various forms of verbs, adjectives, and so on.
- For each part of speech, construct a list of nouns, verbs, whatever — some of them with a p*graphic twist, most not.
- Randomly select phrases from among the various lists.
- Randomly assemble the selected phrases, using the basic sentence patterns, into a random set of sentences.
- With the random sentences as input, randomly generate a work of, umm, e*tica.
Even putting aside the p*graphy issue for a moment, this turns out to be harder than it sounds, indeed much harder if you want the result to be readable. After all, there are so many different forms of words; you’ve got to make the machine “know” about matters like subject-verb agreement, and noun case. You’ve got to make it use pronouns every now and then — using the correct form of each pronoun. And so on, and so on. (It didn’t help that the programming language we’d planned to use was among the worst possible for handling human language.)
Then factor in the desired outcome — the domain of knowledge, so to speak — which in this case is p*graphy… and make the individual sentences and the work as a whole make sense. Which again in this case would require teaching the machine about story structure, and dialogue, and, and, and… (To say nothing of human anatomy.)
Like I said, it was just a thought experiment. Neither of us hoped, aspired, or even remotely wanted to become a King (or even a Vassal) of P*graphy; we were really talking about programming, and about sentence and ultimately narrative structure.
It so happens that others (many others, in fact) have had the same idea, and turned it to practical use.
A simple example, of interest to writers, is the so-called “Writers Idea Bank” from ModeRoom Press. (Screen captures from the Idea Bank are scattered throughout this post.)
The Writer’s Idea Bank is a so-called Google “gadget.” If you’ve got a Google account, and have taken the trouble to create a personalized “iGoogle” home page, you can add the gadget there. (I myself found it on someone’s Blogger-based blog; because Blogger is owned by Google, presumably there’s a way to do this easily. For WordPress and other types of blog, eh, maybe not so much.)
Every time the page refreshes, the Writer’s Idea Bank coughs up a new random five-line premise, or set of premises, for a story. In a way, each of these is a mini-story in itself, an ill-formed haiku of narrative. Reading them is like reading excerpts from a poetic work of magic realism — or copying a passage from Borges into an online translation page, translating it first from English to some other language and then back again (perhaps by way of two or three intermediate translations).
Three more examples. See the pattern(s)?
- Imagine a prostitute darning her stockings
with an out-of-tune guitar.
The sky is of sweet buttered cream;
the rabbi dances in a white silk coat,
while a toy horse rocks in the corner. - A Dutch painter arrives in Amsterdam
with a mouthful of dust.
The corn fields gleam like split honey;
the bored schoolgirls are clapping,
while butterflies lick the flowers with their wings. - You are sitting in a Mexico jail cell
with a large brown cockroach.
Such misery is the result of too much sleep!…
and we laugh like sailors drunk on rum,
while a prisoner contemplates Proust.
Each one consists of a two-line sentence, followed by a three-line sentence. Sentence 1: the only distinguishing grammatic feature seems to be the presence of the word “with” at the start of line 2. (Sentence 1 also always seems to end with a period.) Sentence 2, though:
- Sentence 2 is actually a compound sentence.
- It contains a one-line clause and some sort of conjunctive punctuation — a semicolon, or ellipsis…
- The last line starts with the word “while” — which breaks lines 3 through 5 into another pair of sentences.
(Doing repeated page loads, I have noticed that not just individual words or phrases but entire lines seem to be used intact. For example, “and we laugh like sailors drunk on rum” has shown up several times in that fourth line.)
I don’t know that the Idea Bank will really be all that useful in creating entire plotlines. Rather, I think you may find its best use in jogging yourself into writing/creative mode in the first place. For instance, “The corn fields gleam like split honey; the bored schoolgirls are clapping, while butterflies lick the flowers with their wings” is perfectly set up for immediate use in some pastoral memoir. Don’t use the words and phrases literally; just use them to get your pen moving (as we used to say, pre-keyboard).
(If you’d like to try the Writer’s Idea Bank yourself, you’ll need a personalized Google home page to put it on. Then go to the ModeRoom Press “Accessories” page and click the corresponding Google button.)
Kate Lord Brown says
Ha! You won’t believe it – I’ve just added it to my iGoogle homepage and the first one starts: ‘Describe Romeo and Juliet breaking up with a box of erotic novels.’ I love this … the Surrealists would have loved this. Great link John!
John says
Kate: That’s a GREAT one! Now if only they could come up with a way to let the author seed the generator with keywords — like, oh, say… dwarf… and key… and hamster…
Kate Lord Brown says
Oh dear lord, I know … what is going on over there? I find it fascinating … what happens when the story is developing along normal patterns then WHAM someone throws a surreal element in there (clive). It’s like watching ink seep through water. Good will out!
Jules says
So, I’m not an author, but that’ s just cool as hell.
John says
Kate: I had a Burning Lines installment almost ready to go a few days back. But he (or she) who hesitates there is often lost, and by waiting an hour to ponder the installment, I ensured it would be unusable. :) (Congratulations on having wrought such a monstrosity, btw.)
Jules: There are authors and there are authors. You may think, say, “working on a book” equates to “being an author” but YOU are definitely an author. Or if that makes you uncomfortable, think of it as an author in the works. So I’m not at all surprised you liked the Idea Bank thingy!
marta says
Just because of you and Kate I’m going to see about starting this google home page thingy–though all these ideas are making my head hurt.
John says
marta: Let me know if you need help figuring anything out. (Well, about the Google home page anyhow — with the headache, you’re on your own. :)
They changed the interface a little while ago and I haven’t quite adjusted to it. And I’ve got WAY too much stuff on the home page to pay attention to most of it, most of the time. But it is cool.
Sarah says
My brother worked for IBM back in the early eighties. They had a cool human resources program whereby they provided ASL translators when he needed to talk to his boss or attend meetings (he’s deaf). He learned alot about programming, but then IBM discontinued the interpreter program so he lost the gig. On a happier note, he’s now the head IT guy at the School for the Deaf here in the Bay Area, and loves it. I don’t know why this post reminded me of that- except that he likes these kinds of programs too and I plan on sending him this post. Now he’s a big Second Life fan…
John says
Sarah: Providing ASL translators in the early 1980s — before the ADA started to “sensitize” employers — was pretty progressive. How great was it that your brother landed at IBM, then? Pretty great!
And then there’s the Dark Side, naturally… that they discontinued the program LATER. (Giant corporations are soooo erratic about this sort of thing.)
I had a Second Life account a few years ago — right after SL opened its doors, when researching the technology for a column I wrote about XML. I think I visited that world maybe twice… Now I bet it’s much more interesting (and correspondingly much harder to pry one’s mind away from :).