Skip

With algorithms subtle and discrete / I seek iambic writings to retweet.
March 23, 2012 8:34 AM   Subscribe

Not satisfied with his previous attempt at generating sonnets randomly, mefi's own moonmilk has created a twitter bot that searches for lines of iambic pentameter, and a site where the results are assembled into sonnet form.

The sonnet form is (for me) surprisingly seductive, and I can't help but attempt to read the non-rhyming, nonsensical sets of four lines as quatrains.
posted by kenko (57 comments total) 60 users marked this as a favorite

 
This is great. I think maybe some rhyming could be attempted by reordering the lines.
posted by demiurge at 8:40 AM on March 23, 2012


Aren't sonnets supposed to rhyme? Doesn't appear to be working correctly i.e

who stole the cookie from the cookie jar ?!
I need a f*cking job A S A P
posted by zeoslap at 8:41 AM on March 23, 2012


Oh man, I was totally gonna post this. I have snoozed and lost. It is so great.

And I was totally unaware of that old Exquisite Sonnet thing, but that's fantastic and could use doing again.
posted by cortex at 8:41 AM on March 23, 2012


Aren't sonnets supposed to rhyme?

"In the future, when it has more data to work with, it'll start trying to create rhymes."
posted by kenko at 8:41 AM on March 23, 2012


I mentioned the rhyming idea over in the Projects post, in fact, and moonmilk mentions that it's a desired feature but there just hasn't been enough raw material gathered from twitter yet to produce full rhyming sonnets.
posted by cortex at 8:42 AM on March 23, 2012 [1 favorite]


Wait, does The Hunger Games premiere tonight?
Not Even Gonna Entertain The Thought
Last practice of the season. #bittersweet
I'm looking at the mirror on the wall.

4 inch a cocky ano cocky dat
Shit really irritating me again
Who masturbates in public!? What the fuck!
Friends play a major part in human lives

I really wanna see the Hunger Games.
Who's going to the hunger games tonight?
I got a budget for the lawyer doe
Im living underneath a telescope

All these Chicago rappers sound the same
who stole the cookie from the cookie jar ?!


genius
posted by unSane at 8:43 AM on March 23, 2012 [2 favorites]


I ♥ this eponysterically.
posted by oulipian at 8:45 AM on March 23, 2012 [1 favorite]


(heart)
posted by oulipian at 8:45 AM on March 23, 2012


just did the loudest hiccup ever :/ #cringe
I'm looking like a little kid today
She had relations with an antelope!
I'll be in southern later on today..

I'm sex machine and ready to reload
Does anyone remember chocolate rain?
I really want a twister lolly ice :(
i wanna see the sunrise on the beach

A lovely sunny morning. #gratitude
Play secretary, I'm the boss tonight.
Still waiting on the answer to the clue
I Love Supportive People :-) #Really Tho

fuck andrew is a funny funny cunt
Pandora kinda on the bold tonight


And then suddenly, bestiality.
posted by T.D. Strange at 8:48 AM on March 23, 2012


Metafilter: And then suddenly, bestiality.
posted by ob at 8:50 AM on March 23, 2012 [1 favorite]


This is awesome. Thanks.
posted by yerfatma at 8:50 AM on March 23, 2012


Better then 90% of the content on twitter!

Just kidding. Realistically, 99.99%.

One interesting idea would be to gather 100s of possible next lines, then do modeling to to pick a next line that has the most 'semantic likelihood' of coming next in a sentence. You could do something like "for each word LNi in line n, and each word L(N+1)j in line n+1 what is the sum of probability that they will appear in two consecutive sentences in some corpus, for each pair i and j?" Then pick the next line with the highest probability.

Of course if that makes things too boring, you can mix it up by randomly switching from higher probability lines, to lower probability lines.
posted by delmoi at 8:52 AM on March 23, 2012 [1 favorite]


Wonderful.
posted by activitystory at 8:52 AM on March 23, 2012


kenko: "In the future, when it has more data to work with, it'll start trying to create rhymes."

And a short while later it'll start working on King Lear. Thus proving the old saying that given enough Twitter monkeys, a Twitter bot, and enough data, you'll eventually get Shakespeare.
posted by Osrinith at 8:52 AM on March 23, 2012 [4 favorites]


This is amazing.
posted by cider at 8:56 AM on March 23, 2012


I see the makings of a Mefi Music Challenge here.
posted by NemesisVex at 8:59 AM on March 23, 2012 [2 favorites]


It would also be interesting if further refinement allowed for metrical deviations like the occasional substitution of a trochee for an iamb. Too many unadulterated rows of iambs in lockstep makes me feel like I'm kindergarten. That is not to say that I am anything but extremely delighted with this.
posted by invitapriore at 9:01 AM on March 23, 2012 [1 favorite]


This is just terrific. I wonder if it would be possible to tweak the algorithm so that it finds a wider range of "successful" iambic pentameter lines--i.e., lines with one or more substitutions? It gets a bit tiring reading da DUM da DUM da DUM da DUM da DUM over and over again. Throw in a few DUM da da DUM openings and closings (NOW is the WINter...) and you'd have both more interesting sonnets and a wider range of lines to draw upon.
posted by yoink at 9:03 AM on March 23, 2012


Yeah, this is cool as hell. Pursuant to moonmilk's mention of audiorecording some of these, I already contacted him to offer my voice for the project; it would be rad if a whole bunch of other mefites volunteered likewise!
posted by Greg Nog at 9:08 AM on March 23, 2012


Whole lot of people say, "Tomorrow's gonna be a busy day." a lot.
posted by straight at 9:11 AM on March 23, 2012


Fantastic work! Somewhat in the Oulipo vein, which I love. (And I agree with what Yoink said about varying the metric feet a bit).
posted by crazy_yeti at 9:14 AM on March 23, 2012


Yeah, my English major training is totally making profound sense out of these.

I'd love to these reconfigured to a sonnet rhyme, although a lot of the rhymes might be just the same word (Wait, does The Hunger Games premiere tonight? / Play secretary, I'm the boss tonight).

Let's see:

Its like a universal female code.
She had relations with an antelope!
Im living underneath a telescope
I'm sex machine and ready to reload

I always dream about the weirdest things
now watching, power ranger samurai
it`s the room, the sun (the moon), the sky...
Act like a queen and you'll attract a king.

Well aren't you a funny little fuck?
The thing about the bath and being gay.
Worst part about the dentist: Fluoride! Yuck!
I'm going to the gym tomorrow yay

I'm looking at the mirror on the wall
Mind over matter, money over all.
posted by jabberjaw at 9:16 AM on March 23, 2012 [18 favorites]


Play secretary, I'm the boss tonight

I also just saw that on the sonnet site, and found it interesting that it's in iambic pentameter, as the original delivery of it by Kanye is in quadrameter! It messed with my head to say it with the stresses on every other syallable instead of Play secretary, I'm the boss tonight.
posted by Greg Nog at 9:26 AM on March 23, 2012 [1 favorite]


And a short while later it'll start working on King Lear.

I think that the day this thing manages to randomly put together any 14 consecutive lines of Shakespeare is the day that Moonmilk wins at internet.
posted by VTX at 9:28 AM on March 23, 2012


Thanks for the kind words! I got this idea stuck in my head a few months ago, and I'm really happy with how it turned out.

About rhymes: besides the previously-mentioned problem that there's not enough material for rhyming yet (and jabberjaw has proven that that's not really true!), it's really important to me to present the lines in chronological order, in real time, as they come off of twitter. I may relax those restrictions in the future, though, because I do want to find rhymes when I can.

About rhythm: I made the meter very strict because I didn't want too many clunkers to slip through. But that's another thing I'll relax over time, with some testing. I'd very much appreciate suggestions for specific deviations from the pattern that I should try! (Thanks, invitapriore and yoink!)

The bot is running on twitter's Firehose Sample, which they say is about 1% of all the tweets in the world. I'd love to feed it the full Firehose, which would probably give me enough raw material to do rhyming in near-real time (a few verses per day?) while keeping chronological order. But that would take funding and a real server... or a well-placed contact inside twitter.

Finally, I'd like to mention that this is not my second but my third internet sonnet project!
posted by moonmilk at 9:33 AM on March 23, 2012 [2 favorites]



I'm looking at the mirror on the wall
Mind over matter, money over all.


Oh man this feels like the stream of conscious thoughts of a robot designed to study focus groups or something. It's beautiful
posted by The Whelk at 9:33 AM on March 23, 2012


I have always assumed someone already did this, but it would be sort of trivial to make a Shakespeare Sonnet Scrambler that would just chew up all the individual lines from all his sonnets and then barf up new remixes from that corpus.

I also need to get around to making my Random Proverb generator, that'd just glue tops and bottoms of digested couplets from Proverbs into new, hard-to-implement lifecoaching blurbs.
posted by cortex at 9:34 AM on March 23, 2012


Ok, so the "d" lines' rhymes are pretty damn slant, BUT I think it coheres:

I'm hardly sorry for offending thee.
No point in crying over yesterday
A promise is a comfort to a fool.
You bitches underestimated me.
Don't worry Becky mommy's on her way!
Tomorrow it'll be the second week :)
Still waiting on the answer to the clue
don't mix religion with reality.
I'm going to the gym tomorrow yay
A lovely sunny morning. #gratitude
The youngest of the litter = loved the least
This weather feels amazing! #summertime
Last practice of the season. #bittersweet
Eternal Sunshine of the Spotless Mind (...)
posted by kenko at 9:36 AM on March 23, 2012


An apple a day is worth two in the bush

Give a man a fish, he'll eat for a day, cry before sunset.
posted by The Whelk at 9:36 AM on March 23, 2012


Finally, I'd like to mention that this is not my second but my third internet sonnet project!

Or perhaps fourth; I remember a second go-round of the Exquisite Sonnet project on ark in either the late 90s or early 2000s, but I'm not sure it came to completion. (I remember because I was a participant but when I emailed you my line you were like, "that's nice but maybe try for something a little more metrically correct?" and I felt chastened :(.)
posted by kenko at 9:38 AM on March 23, 2012 [2 favorites]


cortex, my first ever "web app" was the Shakespearian Insult Generator, written in AppleScript on MacHTTPD. (I think it was also the first roboticization of the insult generator, which originally existed as a printed mix-n-match text.)
posted by moonmilk at 9:39 AM on March 23, 2012


For that matter the c lines in the sonnet above are also really slanty rhymewise. Curse you John Keats!
posted by kenko at 9:39 AM on March 23, 2012


Early to bed and early to rise makes a man grey in the dark.
posted by The Whelk at 9:40 AM on March 23, 2012


I'd very much appreciate suggestions for specific deviations from the pattern that I should try!

Your safest variations (i.e., least likely to produce outrageous clunkers) would be a trochaic inversion in the first foot (DAH di di DAH di DAH di DAH di DA) and in the fourth foot (di DAH di DAH di DAH DAH di di DAH). Other reasonably safe bet would be a pyrrhic followed by a spondee to open (di di DAH DAH di DAH di DAH di DAH).
posted by yoink at 9:43 AM on March 23, 2012 [1 favorite]


The astute among you will have realized that if anyone knows whether the sonnet project I mentioned above came to completion, it's moonmilk himself, and that, therefore, the only reason I have for bringing it up is my bitter resentment at having had my metrical abilities shown to be so lacking. In fact, that's the only reason for this post at all—and not just that: my metafilter membership, even though it predates his, is nothing but a long-term plan eventually to be able to get my revenge.
posted by kenko at 9:45 AM on March 23, 2012


kenko, the 2nd exquisite sonnet project never finished -- I think i never got past 10 or 11 lines -- and I don't remember why. It was probably your fault. (I kid!)

In a project like this, you gotta be pretty strict about meter, because you don't have coherence or storytelling to fall back on!
posted by moonmilk at 9:51 AM on March 23, 2012


kenko, the 2nd exquisite sonnet project never finished -- I think i never got past 10 or 11 lines -- and I don't remember why. It was probably your fault.

Haha oooh buuuurrrrrn
posted by clockzero at 9:58 AM on March 23, 2012


This is superb.

Why?
To find inadvertant poetry in the endless torrents of language that slosh around the internet.

posted by donovan at 10:01 AM on March 23, 2012


This is fab!
posted by maxwelton at 10:11 AM on March 23, 2012


Wow, this is great. My favorite bit so far:
Thanks for the love and Karma is a bitch.
I try and find the good in everyone.
Some females really get beside themselves
So super disappointed with myself.
Wheels within wheels there. Wheels within wheels.
posted by koeselitz at 10:19 AM on March 23, 2012


Thanks for the love and Karma is a bitch.

That one's interesting because it is very clearly DAH di di DAH in the opening. The algorithm already seems occasionally to allow for that--I wonder why? Hard to imagine anyone thinking "for" gets the stress there.
posted by yoink at 10:35 AM on March 23, 2012


well done R, very cool.

... as always.
posted by EricGjerde at 10:43 AM on March 23, 2012


Yoink, presumably the algorithm is just consulting a word list that says "for" is stressed, and doesn't take context into account?
posted by kenko at 10:43 AM on March 23, 2012


Tell me, is there any such thing as a Machine Poetry library? Because I want one.
posted by philipy at 10:47 AM on March 23, 2012 [1 favorite]


Yoink and kenko, that's right: "thanks" and "for" are both marked as stressed in the dictionary, and the algorithm has a single exception to its strict metric rule: it's ok to start with a stressed syllable if it's a one syllable word.
posted by moonmilk at 10:49 AM on March 23, 2012


Those are some sweet algorhythms.
posted by bokinney at 10:54 AM on March 23, 2012


it's ok to start with a stressed syllable if it's a one syllable word.

Meaning "it's o.k. to start //" or "it's o.k. to start /x if the first syllable is a one-syllable word"?

I'm interested that the dictionary lists "for" as stressed--of course all one-syllable function words can acquire stress pretty easily, but I'd have thought "for" more often occupied a nonstress slot than a stress slot.

One useful way to code for this might be to have a code for "always stressed" and a code for "sometimes stressed" and another for "never stressed." Then if your "sometimes stressed" syllable finds itself beside an "always stressed" syllable it gets demoted to "unstressed" and if it finds itself with nonstresses on either side it gets promoted to "stressed." That would get you the right result in 95% of cases. Of course, coding all those syllables would be a monumental drag.
posted by yoink at 11:34 AM on March 23, 2012


Actually, yoink, the dictionary I use (CMU Pronouncing Dictionary) marks each syllable as 0 (unstressed), 1 (stressed), or 2 (secondary stress), and I found that it works really well to allow a 2 syllable to fill either role. That's how it's operating now. That doesn't solve the problem with one-syllable words, though, which are each marked either 0 or 1 in the dictionary. Maybe I should go in and alter them all to 2's.

If the first word of a tweet is a one syllable word, then the algorithm considers it ok even if it's marked as a stressed syllable. If the first word has two or more syllables, then an initial stress will disqualify the tweet. Does that answer your question?
posted by moonmilk at 11:52 AM on March 23, 2012 [1 favorite]


Cortex - long time back I made a Shakespeare sonnet scrambler that maintained rhyme. I also have a proverb generator that is an offshoot of a huge insult generator that uses generative phrase structure grammars and giant vocabulary lists to make some crazy insults. It also does Kant and Heiddeger.
posted by njohnson23 at 12:15 PM on March 23, 2012 [1 favorite]


Does that answer your question?

Not quite. What does the rule say about the second syllable? In other word, will it accept the opening pattern:stress, stress, unstress, stress so long as the first syllable is a single word, or would it also accept:stress unstress unstress stress in that case?

I.e it will accept:
Strike! Strike the door of bronze.
but will it accept:
God is a rock to which we cleave?

Secondary stress is a useful thing to have in your dictionary, but it probably doesn't apply to a word like 'for' which is usually unstressed but occasionally fully stressed. I imagine they reserve the secondary stress marking solely for multisyllable words in which one syllable must be given the primary stress and others secondary. E.g. exCORiATE, where COR takes the primary and ATE the secondary stress. That would be really useful if you were trying to code for triple meters where secondary stresses are routinely demoted (He exCORiates GLADly polITical SCUM--where both -ates and -cal are demoted secondary stresses).
posted by yoink at 1:18 PM on March 23, 2012


It speaks!
posted by rageagainsttherobots at 2:29 PM on March 23, 2012


I have always assumed someone already did this, but it would be sort of trivial to make a Shakespeare Sonnet Scrambler

I tried that once. It was in fact sort of trivial, but the results were not as interesting as I hoped. The corpus is pretty small, so depending on how I tuned the generator I would either get meaningless nonsense or text that was obviously just pasted-together bits of existing sonnets.
posted by Mars Saxman at 3:32 PM on March 23, 2012


I once wrote a program to generate poems/lyrics based on arbitrary rhyme schemes (AABBCC, AABBA, whatever) and arbitrary meter. The final version relied on template-matching using a corpus of popular song lyrics, with nouns/verbs/adjectives/adverbs converted to placeholders. These were substituted using WordNet in a kind of random search. So essentially madlibs with meter and rhyme, and some unremembered scoring heuristics. Various kinds of rhyme were considered -- reverse, elided, etc.

Results varied from the weird:
he placed sections in the selection
priorities shoulder in sanction
wards are hitting reserves
they crank National Parks
dead meals coalesce the connection
To the surreal:
upper-class textiles smile
ribbed designs dip the mile
shrubby lymph nodes agree
comfy gowns feel oblique
year-around vowel sounds buss investment trust
tax returns have enmeshed pigeon-toed forecasts
As you added more syllables, the algorithm used fancier words to fill the space, so it got really undealable:
submachine guns untangle field goals in the prayer
Rhode Islanders plump down Christmas cards in the flair
air-to-ground radio sources carry on to incite
remote-controlled Emission spectra are equating him in the white
posted by RobotVoodooPower at 8:10 PM on March 23, 2012 [4 favorites]


"ribbed designs dip the mile" is unbeatable.
posted by kenko at 11:30 PM on March 23, 2012 [1 favorite]


yoink - as it is now, there's no such flexibility in the second syllable.

RobotVoodooPower - neato!
posted by moonmilk at 9:11 AM on March 24, 2012


Hey! Pentametron has learned how to rhyme. It's only doing couplets for now, but it'll figure out quatrains soon.
posted by moonmilk at 8:48 PM on April 13, 2012 [2 favorites]


All this attention isn't always great
Attraction has an expiration date
Love holidays. Escape reality :)
My parents fighting really bothers me!!
Well done sir.
posted by Ritchie at 5:52 PM on April 21, 2012


« Older "Rule 100: Cleanse not your teeth with the...   |   Dartmouth Idol Newer »


This thread has been archived and is closed to new comments



Post