Poetry and Computers: Questions of Making and

Patricia O’Neill
Hamilton College
April 2016
“Poetry and Computers: Questions of Making and Meaning”
For over 60 years experiments in computer-generated poetry and the
use of computers for literary analysis have sparked debates about the
relations of science and the humanities. One of the earliest and probably the
most bitter opponent to computer generated poetry was Cambridge professor
F.R. Leavis, the author of The Great Tradition and public advocate for the
humanities. I am grateful to Willard McCarty for sharing his collection of
articles on Leavis’s attack on the work of Professor Margaret Masterman,
founder of the Cambridge Language Research Unit. Professor Masterman
sparked Leavis’s ire when she created a computer program for writing
haikus. Masterman presented her work to the general public in a TLS article
in 1970. Along with a diagram that explained how the program worked she
took pains to explain that a computer poem –in contrast to a human
generated poem—is a system and a toy: a system which can produce an
indefinite number of poems from a single frame and a toy because anyone
1
can use it to produce what she called “toy” poems. She especially targets
businessmen whom she encouraged to write haikus instead of obsessing over
market reports. The benefits of algorithmic poetry-writing she contended
was that it proves that there is a logic to poetry and that the user gains an
appreciation for “real” poetry from working with the haiku generator. For
Masterman, the haiku generator promoted the creative process among nonpoets and poets alike. For real poets, the haiku generator revealed the limits
of the machine over human invention but also offered poets inspiration and
the ability to tap into the larger word resources of the computer’s database.
According to Masterman, poets are able to play with words within the haiku
program in ways they could not with what she calls “the ordinary, dead, nonreactive typewriter.” For Masterman and for programmers ever since, the
creative process is enhanced by such play and every good poem ultimately
still reflects the inventiveness of the human poet’s imagination.
Leavis’s opposition to the idea of computers and mathematical models being
applied to any aspect of intellectual, moral or creative life reflected his
commitment to the idea of the university as the “creative centre of
civilization.” In contrast to the quantitative methods of commercial and
political institutions, the university’s aim was to promote “the continuous
2
collaborative creativity that ensures significance, ends and values, and
manifests itself as consciousness and profoundly human purpose.” He saw
the computer and technology in general as a threat to consciousness and to
the kind of creativity that makes us human. The lines are drawn early on,
then, between those who can conceive of the part computers can play in the
creative process, even if only as a toy, and those who see computers as
number crunching tools that reduce human imagination to inhumane
algorithms.
Fast forward to the introduction of the World Wide Web, personal
computers and mobile devices, MOOCs and now in the heartland of the
university the introduction of “digital humanities” and “new media studies”.
One imagines Leavis kicking furiously in his grave. But the question of
computers and poetry, the process of writing and the creation of meaning
through language remains in “play” so to speak.
Before I talk about my own work with computers, programmers, and poetry,
we need to remember another historical thread, this time, strictly within the
humanities. During the same decades that computers were becoming part of
the toolbox of linguists and scientists from various fields, experimentation
3
among poets, musicians and artists started to challenge the dominance of
high modernism in contemporary and literary culture. In post WWII
America abstract expressionists, jazz musicians, the Black Mountain School
of poets and later the so-called LANGUAGE poets identified themselves
with an alternative tradition from that of T.S. Eliot and Wallace Stevens. The
“Projectivist,”1 movement as M. L. Rosenthal called them, traced their
poetic affiliations from Pound and Zufofsky to the work of Charles Olson
and Robert Creeley. While there is no unified set of principles and practices
among these avant-garde poets, one could say that their energies were
directed toward experimentation with language apart from traditional poetic
forms and that they increasingly relied on the reader to find meaning in the
fragmented phrasing of what Ron Silliman called “The New Sentence.” The
importance of this alternative, experimental and postmodernist trend in
American poetry was that it challenged the critical establishment for whom
the “verbal artifact” of modernist lyrical poetry represented the
quintessential expression of human values and creative imagination.
Postmodern poetry strives instead to focus on the processes of language, the
ambiguity of the poetic line, and the materiality of words as code and
structures that might oppose meaning in its conventional sense. As Jerome
1
Charles Olson described this as open form verse based on poetic line as a unit of breath.
ML Rosenthal support the “natural” quality of language, use of vernacular etc.
4
McGann noted in his 1988 defense of Language poets, “What we confront
here, however, is not so much an issue of poetic style or poetic quality as it
is a problem in ideology, the kinds of cultural ideas that are to be propagated
through that crucial ideological apparatus, the academy.”
The academy, through the ideologies and methodologies of the New Critics,
were not prepared to understand the work of LANGUAGE poets.
LANGUAGE poets disrupted the idea of textual space in their concrete
poems and they used fragmented syntax, invented words and, sometimes,
mathematical modes to organize their poems. The seemingly random use of
words and open forms of LANGUAGE poetry increasingly placed the
burden of making sense of the work on the reader. Readers were expected to
approach the work by looking for patterns, using their knowledge of
metaphor and historical/social/literary contexts to gather a plurality of
meanings rather than reveal correspondences between form and meaning.
This shift from the authority of the poet or critic to a collaborative model of
poet-reader prepared the way, consciously or not, for the introduction of
computer generated and digital poetry. Just as poet/critics like Ron Silliman
underscore the difference between meaninglessness and nonsense in
LANGUAGE poetry, critics like Christopher Funkhouser have made the
5
case for the conceptualism and cognitive demands of digital poetry.2
Computer generated poetry, like some examples of LANGUAGE poetry,
also combine preset word lists in controlled and random combinations. In
some cases the reader does not participate in the process of generating text
and in other works, there is an interactive element as in Masterman’s haiku
generator. In both, postmodern human generated poetry and programmer
generated digital poetry, the reader is responsible for interpreting the poem
and deriving meaning, “from the verbal associations while reading the text
in and against its contexts” (Funkhouser, 246). What has not been fully
explored is the new partner in the collaborative writing and reading of
contemporary digital literature, the programmer and the effects of code on
the poetic text.
In the rest of this paper I want to share my thoughts about a poetry generator
that I built with the collaboration of a software engineer who majored in
English as an undergraduate and therefore had no problem understanding
what poetry is and does with language. I want to suggest that the scholar and
the programmer necessarily collaborate in the process of creating the
necessary rules, structures, and challenges for poets/users. I further suggest
that following the logic of code enhances our understanding of both
2
see New Directions in Digital Poetry by C.T. Funkhouser, NY: Continuum, 2012
6
traditional and experimental poetic forms and potentially provides the kind
of creative experience that Leavis attributed to human consciousness and
profoundly human purpose. “The Code is not the Text (unless it is the Text)”
as John Cayley has written, but it is a profoundly important part of the
creative process for the writer/user of digital media.3
As part of my work on the Kashmiri American poet Agha Shahid Ali, I
collaborated with Greg Lord and the Digital Humanities Initiative at
Hamilton College to create an interactive “ghazal creator” site. I had already
launched a digital archive of Shahid’s taped poetry readings and some of his
manuscripts. But I wanted something more enticing to inspire students and
scholars to learn about the ghazal because this classical Urdu-Persian poetic
form was championed by Shahid for writers in English. It is, I think, one of
his most important contributions and legacy to American letters.
What is a ghazal? The ghazal is an ancient Arabic-Persian-Urdu poetic form,
older than the sonnet. It consists of a series of 5-12 couplets of equal meter.
Each couplet may have a different topic but the underlying unity of the poem
3
Cayley’s essay can be found online:
http://electronicbookreview.com/thread/electropoetics/literal
7
traditionally comes from its emotional tone, which Shahid identified as the
idea of “longing.”4
Although the ghazal originated in Arabia, by the 12th century it had spread
to Persia and the Indian subcontinent through the work of important Sufi
poets like Rumi and Hafiz. In Northern India, the 17th century ghazals of
Mirza Ghalib established the Urdu tradition of the form, which is still
written and sung by poets and performers throughout the subcontinent, Iran,
and central Asia. By the 19th century European poets and scholars had
introduced the ghazal to the non-Islamic world.
Shahid devoted the last decade of his life to promoting the ghazal in
English. He began by translating the ghazals of the modern Pakistani poet
Faiz Ahmed Faiz. He also criticized the earlier work of American poets who
had written ghazals without paying attention to its form. In the introduction
to Ravishing Disunities: Real Ghazals in English (Wesleyan, 2000), Shahid
explains the importance of the ghazal’s formal characteristics, which include
the repetition of a refrain in both lines of the first couplet and the second line
of subsequent couplets, the rhyming of the word just before the refrain in
each couplet, and a reference to the poet himself/herself in the final couplet
4
Ravishing Disunities: Real Ghazals in English (Wesleyan, 2000)
8
of the ghazal. Although contemporary students find the discontinuity of the
couplets’ themes attractive, they find the idea of longing as the emotional
underpinning of the ghazal difficult to grasp in their own work. For the
vocabulary of longing one must turn to the original poets themselves and the
ghazals of Shahid. Nevertheless there is something about the formal
structures of the ghazal with its repeated refrain that gives even amateurs a
sense of something different from both free verse and other poetic forms in
English.
Display ghazal creator: :
http://dhinitiative.org/demos/ghazal/introduction.php
Like all poetry generators, the ghazal creator uses a database and a series of
commands. But these days computer code can draw from databases on the
WWW as Greg did in importing the CMU Pronouncing dictionary which not
only includes 133,000 words but also presents them as phonemes with stress
markers, which allowed Greg to program the syllable counting function.
The second step was to build a rhyming dictionary. Some are already
available on the web but it is hard to integrate someone else’s rhyming
dictionary in one’s own site, so Greg built one that used the words in the
CMU dictionary. First, he had to answer the question what is a rhyme and
9
answer it in terms a computer could understand. The easy answer was to
direct the computer to the last vowel in a word and match the subsequent
syllable, but that created the non-rhyme of “phonetic” with “academic”.
Other problems of what to do with one-syllable words and multi-syllabic
words also needed special rules. The goal of Greg’s programming was to
engage people’s interest in poetry rather than create the ultimate rhyming
application so after various tweaks he programmed the computer to “Find
the second to last vowel in any word, unless there’s only one vowel. Take
that vowel and everything after it, and match it against other words that end
with the same phoneme sequence and the same emphasis per vowel.
Testing the ghazal creator but using randomly selected words from the
database showed that this rhyming function produced not only good rhymes
but generated a list that seemed aesthetically in line with what would be
useful for poets.
A similar and perhaps more daunting step was to create a syllable counter so
that users could track the number of syllables in each line. Ghazals can have
between 8 and 14 syllables but whatever line length poets choose, they
should be consistent within the individual ghazal.
10
Greg’s initial command was for the computer to count the vowels but that
did not work for diphthongs and a special rule for diphthongs required a
subsequent rule if the first vowel in the diphthong is “i”. In effect Greg was
learning through programming what linguists deal with all the time—the
complexity of English as a language that is derivative of many other
languages. After creating about 30 extra rules, Greg had the algorithm that
would allow users to see their syllable count as they wrote each line. It is
still not perfect but we are relying, as all inventers and programmers do, on
user feedback. For now random word testing shows the syllable counter to
be 93% accurate.
Here is the URL for the ghazal creator and I hope you and your students will
try it out sometime: http://dhinitiative.org/demos/ghazal/introduction.php
My students and students in creative writing have enjoyed using it and I
have here a list of some of their work:
http://dhinitiative.org/demos/ghazal/poems.php
In reading Greg’s blog posts as he was working on the ghazal creator I
realized that there is a correlation between the writing of code and the
writing of poetry and that poems or creative sites of programmer/poets need
to be understood from the perspective of the creative process rather than just
11
the creative product. Like a poet’s manuscript drafts, the code is part of the
conceptual framework and creative experience of the labor/work of art.
Poetry generators share with contemporary digital art self-consciousness
about the medium as well as the content. This is especially true in programs
that are interactive or participatory. When knowledgeable people look at
code they see choices to organizing the program and sometimes recognize
the “wit” of it all. The code can be available in tandem with the output to
allow user/readers to be aware of its complexity, plasticity, conceptualism.
More than having merely an instrumental function, the ghazal creator
interprets the structures of the ghazal in the first place and models the ghazal
to users as frameworks for new acts of creativity.
This experiment with representing the ghazal through code extends the
formalist’s interest in poetic structures to allow users to input their own
subjective choices of words. The rules of rhyme and refrain and syllable
count become a game in which players create meaningful verse and in which
real poets master the possibilities and test the limits of the ghazal creator’s
database.
The code which informs the program and the interface become a part of the
creative process, then, by highlighting the complexities and structures of
natural language, and by representing language in such a way that we
12
become aware of how we make meaning in conventional and nonconventional ways. This investigation into the history of poetry generators,
the evolution of poetry as conceptual art in the late 20th century, and the
critical study of code as part of the creative process in digital poetry and
critical practice in the teaching of poetry promises to show how digital
humanities bridges science and the humanities within the ongoing mission of
the academy, as Leavis envisioned it, to ensure “significance, ends and
values,” and to promote “consciousness and profoundly human purpose”
even in the digital age.
There remains of course at least one caveat to all of my musings about
technology and the creative process. Computers can encode words, but is
there a code for conveying emotion? What about the emotion of longing that
is essential to the ghazal tradition? The ghazal creator provided maker/users
with the formal requirements of the ghazal, but what about this intangible
but essential cultural aspect of the form? That problem required another kind
of computer program, and another collaboration. But that will be left for
another paper.
13
14