Poetry meaning and folksonomy flaws

In my Electronic Texts class this semester, we have decided on a class project: a poem illustrator.

The idea is simple enough: input a poem and the program will pick a flickr picture as an illustration.

But how to pick the picture? You could analyze the poem, remove stop words, find the most common words, and search on that. But that doesn’t return great results because a) there may be quite a few “most common” words, and b) just because a word is the most common, doesn’t mean it will return a meaningful picture.

So as an alternate method, the class decided to run each of the words in the poem (minus stop words) through the flickr.tags.getRelated Flickr API method, and then again sort the results and find the most common word.

The idea was that if you have words like “flower” “tree” “field” “bird” you might, using this method, hit upon the common word “nature” and thus be able to use that to help pick a picture to illustrate the poem.

Well, I decided I just had to try this out this weekend (I’m impatient). So last night I wrote something in Ruby that would read in the poem, put the words into a list (I chose to ignore duplicates), and then feed those word to the flickr API and get a list of related tags, and then rank the tags. My code is crude and clumsy (for instance, I didn’t even filter out stop words because Flickr does that for me) but I got results.

The first poem I ran through was T.S. Elliot’s “The Waste Land.” Actually, to be more precise, it was the first part of “Wasteland,” because it’s a long poem.

“The Waste Land” by T.S. Elliot

APRIL is the cruellest month, breeding
Lilacs out of the dead land, mixing
Memory and desire, stirring
Dull roots with spring rain.
Winter kept us warm, covering
Earth in forgetful snow, feeding
A little life with dried tubers.
Summer surprised us, coming over the Starnbergersee
With a shower of rain; we stopped in the colonnade,
And went on in sunlight, into the Hofgarten,
And drank coffee, and talked for an hour.
Bin gar keine Russin, stamm’ aus Litauen, echt deutsch.
And when we were children, staying at the archduke’s,
My cousin’s, he took me out on a sled,
And I was frightened. He said, Marie,
Marie, hold on tight. And down we went.
In the mountains, there you feel free.
I read, much of the night, and go south in the winter.

by Jon Bradley Photography

by Jon Bradley Photography

Here’s the top of the sorted returned related tags I got back:

102 – <tag>abandoned</tag>
3 – <tag>wood</tag>
3 – <tag>blossoms</tag>
3 – <tag>window</tag>
3 – <tag>blackandwhite</tag>
3 – <tag>trees</tag>
3 – <tag>river</tag>
3 – <tag>rocks</tag>
3 – <tag>scary</tag>
3 – <tag>purple</tag>

“Wow!” I thought. 102 times I got a related tag “abandoned” for the poem The Waste Land. This returned the Flickr picture on the right, which I consider a great illustration for the poem.

At this point I did a little dance (literally, ask my husband) and congratulated myself on Twitter.

But too soon! Because I had not ran the results on any other poem. As it turns out, “abandoned” is a REALLY common flickr tag (as is “abigfave”).

Take this example:

“Messy Room” by Shel Silverstein

Whosever room this is should be ashamed!
His underwear is hanging on the lamp.
His raincoat is there in the overstuffed chair,
And the chair is becoming quite mucky and damp.
His workbook is wedged in the window,
His sweater’s been thrown on the floor.
His scarf and one ski are beneath the TV,
And his pants have been carelessly hung on the door.
His books are all jammed in the closet,
His vest has been left in the hall.
A lizard named Ed is asleep in his bed,
And his smelly old sock has been stuck to the wall.
Whosever room this is should be ashamed!
Donald or Robert or Willie or–
Huh? You say it’s mine? Oh, dear,
I knew it looked familiar!

by windy234

by windy234

Here’s the top of the list of returned tags for this one:

86 – <tag>abandoned</tag>
86 – <tag>adorable</tag>
3 – <tag>d200</tag>
3 – <tag>clothes</tag>
3 – <tag>d300</tag>
3 – <tag>christmas</tag>
3 – <tag>cat</tag>
3 – <tag>city</tag>
3 – <tag>clouds</tag>
3 – <tag>d80</tag>

As it turns out, searching for “abandoned” and “adorable” mostly returns pictures of stray cats.

I am not sure why “abandoned” is such a popular related tag, but this means I am back to the drawing board. To be sure, there are a lot more variations the class can try here—we can run all the words, not removing the duplicates. Lots of improvements can be made on my often broken and inconsistent code—I can’t even replicate the results I got the first time for “The Wast Land” already!

The big question on my mind is, how can we get an accurate measure of “relatedness” when it comes to words? Going back to the original example, how can we train a program to derive “nature” from the words “flower” “tree” “field” “bird”? It is possible to use the Flickr tags for this purpose? The idea behind folksonomies let me down here—as it turns out, people add tags for all kinds of reasons other than to describe the picture. I already knew this by my own practice using tags—I often use tags with no semantic purpose, for instance to group a few images together. I guess I thought the most popular use of tagging would be to describe a photo. The tag “abigfave” refers to the flickr group “A Big Fave” which seeks to find and promote good images. The thing is, I shouldn’t feel let down by folksonomies here. The tags are still serving their purpose by helping people find things.

I’ve been trying to think of other ways to get at the related words of a poem. I thought of mining delicious.com tags, but those are used for even more utilitarian purposes—e.g. items tagged with “flowers” are likely also to be tagged with “wedding.”

One other idea I can think of is to create our own related words list by mining, say, a million books. This is one possible answer to Gregory Crane’s question “What Do You Do with a Million Books“? I’m not sure exactly how this would work—it would probably involve analyzing the texts for words that appeared near each other, maybe. Even if we did the analysis, though, we may end up finding the same results as my Flickr search did. The thing is, it’s impossible to know without trying first.

This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

6 Responses to Poetry meaning and folksonomy flaws

  1. I’m studying multimedia information mining in a LIS class right now and your post today was right up my alley! Lot’s of potentially interesting applications. Thanks

  2. Heather says:

    This is a really cool idea, Karin. The Wasteland image is very apropos. I’m excited to see where it goes!

  3. Laura Norvig says:

    It’s semantical, baby! Seems to me the only reliable way to get meaningful related terms would be to run the terms through some kind of external semantic database that already has “learned” or “been told” that flower, tree, bird, etc., are all part of nature. Once that external database finds the big related concept like nature, feed that back into flickr. Or something like that.

    • karin says:

      Totally, but the hard part, it turns out, is finding that semantic database. If anyone knows of one, let me know. :)

  4. Karin,

    Very neat ideas — and I DEFINITELY see how tags in flickr would break down very quickly. I totally agree with what you say about tags — I’m also thinking of them less and less as a meaningful organizing tool. Instead, they are a discovery tool, and organizing and discovering don’t always overlap.

    As for other tools to work with this kind of semantics, the one that first springs to mind is Wordnet. It’ll likely take some work to sort through the symsets and whatnot, but it likely has the semantic data to work with.

    Oh…and last thing, as a former English prof, I’d definitely advocate keeping the word repetitions in place. As a first interpretive step, I always taught students to first find the repetitions — those will always be an important guide.

    Good luck!
    Patrick

  5. Kevin says:

    Very very cool, I don’t know how I missed this post before. You make good points about tagging, I had considered mining/using tags to obtain semantic data for a different project (although on a much smaller domain). The whole concept of using tags for organization instead of to provide semantic meaning is something I hadn’t considered really. I like the WordPress model in this sense because it differentiates by default between categories and tags.