Saturday, January 30, 2016

Poetry and Code: Project Idea

One answer is that it might inspire you to write code.

While I was reading B. H Fairchild's "Hearing Parker for the First Time," for class, I began to absently squiggle lines across a piece of paper as I read. Essentially, there were products of my unconscious. But when I had seen what I had done, that got me to think: "How could you visualize poetry?" I recall the Mina Loy quote I had been familiarized with so many times while consulting the first syllabus: "Poetry is prose bewitched, a music made of visual thoughts, the sound of an idea.”  Is there something about poetry, as opposed to prose, that makes its music, its sound, inherently visual?

Novels are turned into movies all the time, and so are short stories. However, I wouldn't say that these are visualizations of the language, as much as adaptions of the events. In asking "how could you visualize poetry," I wanted to understand visualization in the same context as data visualization: making the some intangible aspect visually accessible, without adding or changing what was already there. The patterns that a graph might illuminate were already present in the data used to make that graph.

The intangible idea in poetry I want to try to get a program to visualize is the feeling of momentum."Hearing Parker for the First Time," for example, has an incredible sense of motion. B. H Faichild very cleverly slows the pacing of the poem through frequent commas and periods right up until "ornithology came winding up..."-- right until the speaker hears Parker for the first time. Then, in the third stanza, Fairchild doesn't use any punctuation, producing a gathering inertia right up until a reflection upon the narrator's own life, "farther from wheat fields and dry creek beds than I would ever travel..." then "being carried away."

So it's clear that punctuation plays a role in charting the course of a poem's pacing. But in order to visualize this, before actually writing any code, somehow a system has to be put into place, that breaks the role of each comma and period numerically. We, the human readers, naturally understand exactly how to pause our breath for individual punctuation marks, but computers won't. This too, is part of the question, how does poetry help programmer write better code. It might challenge you to express ideas in terms a computer can understand.

My initial idea, as illustrated below, was to model each individual word or punctuation mark as a series of lines with fixed length, each one beginning on the last's endpoint. A word would have slope one, a comma zero, and a period -9999, immediately followed by a line of slope zero.



There's a couple of things about this model I didn't like, though. For one thing, it looks blocky and inorganic. Another is that when we read poetry, pacing is more quadratic than linear; for me, it's only when a poet really carries the sentence past a critical mass that a feeling of increasing speed develops. Lastly, it doesn't take into account that some sentences are longer than others because they contain words with more syllables.

The revised idea was, instead of drawing a graph, tracing the motion of an object under a set of "physical" rules. It would go to the right a certain amount every second, and at the start of every second, a syllable would increase its y-axis upwards acceleration, a comma would set it to zero, and a period, line break, or ellipse would decrease it to varying degrees.




I plan to hopefully produce something that may be used as part of a public poetry project, so any program would take the form of a web app. I've seen a couple text parsers out there in Javascript that look promising (primarily for syllable counting) and might be able use a game framework such Phaser, to take advantage of the physics functionality built into those and other features that might extend the project. This blog post addressed the potential design of such a poetry visualization program on the most general level, but there are still a whole lot of things to think through, like, how would such a program accept user input, in what form the data from the poem should be stored in after being parsed for syllables and punctuation (dictionary? array?), making it so any framework used is able to read in the data to affect the motion of a game object, and so on. Stay tuned to see if this goes anywhere.

Some questions: do you think poetry should or can be visualized by programs? If so, any suggestions on improving the model described?

4 comments:

  1. Amazing job, Nich! When you explained this to our group I knew it would be super interesting. Another thing I was thinking (that would be pretty complicated but is cool to think about) is somehow making it so the lines go up and down, not just according to punctuation and such, but just with the flow of the poem. Obviously it would vary from person to person but I really like the EKG line aspect of reading a poem, because it does kind of mess with your heart sometimes

    ReplyDelete
  2. This is really interesting Nicholas! I think this would be very cool to compare the program's reading of the poem to a person's reading to see what things someone might do subconsciously when they are reading a poem.

    ReplyDelete
  3. This was a really interesting take to the prompt!! I like your interpretation of the poem, the way you took a scientific view of the prompt. I thought it was great, but I also agree with Maddie; if you could take this one step further and include your interpretation of each line of stanza, I'd love to see that in action!

    ReplyDelete
  4. Hey, you, girly-girl... Gotta whole lotta gobbsa poe.try in our 22ish? blogs. Take a lookit and grow-up... never down after our demise.

    Nevertheless, Would you puh-leeze help a 'Plethora Of Wurdz' [POW!] which are look'n for a new home in your novel? Yay! Whew...

    Q: Can anyone tell me the difference between K2 and IQ? A: Nthn. In Seventh-Heaven, we gitt'm both for eternity HawrHawr Need a few more thots, ideers, raw wurdz or ironclad iconoclasms? Voila!!

    VERBUM SAT SAPIENTI: As an ex-writer of the sassy, savvy, schizophenia we all go through in this lifelong demise, I just wanna help U.S. git past the whorizontal more!ass! we're in (Latin: words to [the] wise)...

    "This finite existence is only a test, son," God Almighty told me in my coma. "Far beyond thy earthly tempest is where you'll find tangible, corpulent eloquence". Lemme tella youse without d'New Joisey accent...

    I actually saw Seventh-Heaven when we died: you couldn't GET any moe curly, party-hardy-endorphins, extravagantly-surplus-lush Upstairs (in [the] end without end -Saint Augustine) when my beautifull, brilliant, bombastic girly-girl passed-away due to those wry, sardonic satires.

    "Those who are wise will shine as brightly as the expanse of the Heavens, and those who have instructed many in uprightousness as bright as stars for all eternity" -Daniel 12:3, NJB

    Here's also what the prolific, exquisite GODy sed: 'the more you shall honor Me, the more I shall bless you' -the Infant Jesus of Prague.

    Go gitt'm, girl. You're incredible. See you Upstairs. I won't be joining'm in the nasty Abyss where Isis prowls
    thesuperseedoftime.blogspot.com
    infowars.com
    -YOUTHwitheTRUTH
    -------------------------------
    PS Need summore unique, uncivilized, useless names? Lemme gonna gitcha started, brudda:

    Oak Woods, Franky Sparks, Athena Noble, Autumn Rose, Faith Bishop, Dolly Martin, Willow Rhodes, Cocoa Major, Roman Stone, Bullwark Burnhart, Magnus Wilde, Kardiak Arrest, Will Wright, Goldy Silvers, Penelope Summers, Sophie Sharp, Violet Snow, Lizzy Roach, BoxxaRoxx, Aunty Dotey, Romero Stark, Zacharia Neptoon, Mercurio Morrissey, Fritz & Felix Franz, Victor Payne, Isabella Silverstein, Mercedes Kennedy, Redding Rust, Phoenix Martini, Ivy Squire, Sauer Wolfe, Yankee Cooky, -blessed b9 (or mixNmatch)...

    God blessa youse
    (trust-N-Jesus)
    -Fr. Sarducci, ol SNL

    ReplyDelete