Skip to content

2 Strachey Love Letters

July 13, 2010

DEAR SWEETHEART,
     YOU ARE MY WISTFUL TENDERNESS. YOU ARE MY EAGER CHARM. YOU ARE MY IMPATIENT ARDOUR. MY WINNING HUNGER IMPATIENTLY PANTS FOR YOUR EAGERNESS. YOU ARE MY CURIOUS FEELING.
                 YOURS BREATHLESSLY,
                 M.U.C.

Magical Influence,
     My panty assiduously yearns your purified snake. My race pilfers your well-intentioned feel. You are my placid spring. My youth says your chaste glitter. You are my fluffy cavern.
                 Yours joyfully,
                 Delicacy

July 11, unsupervised generation from human-authored rules, implementing the Strachey Love Letter algorithm.  Generator: JanusNode.

I wish I knew German so I knew wtf David Link was talking about:

I mean, he’s the kind of guy who hunts down an obscure text generator developed by a computer scientist for fun back in 1952.  He’s the kind of guy who implements an emulation of the generator, complete with weird blinking interface.  Did that text generator really exist back then? Does he really exist? It’s gotta be a hoax, or some kind of performance art maybe. 

If it is some kind of hoax, (UPDATE: it’s not) it’s a pretty entertaining one.  Elshtain brought it to our attention a couple days ago.  The generator from the 50s is basically a template:

Generate Salutation 1 and 2,
Do this 5 times:
   Randomly generate one of the following templates:
      1. "You are my" Adjective Noun
      2. "My" Adjective(optional) Noun Adverb(optional) Verb, Your Adjective(optional) Noun
Generate "Your" Adverb, "MUC"

Christopher Strachey, who developed the algorithm back in ’52, was the kind of guy who could hit up his old pal Alan Turing for computer documentation. (Interestingly, both Strachey and Turing were gay.) This was before they had operating systems, btw, let alone graphic user interfaces. Back then, if you wanted express your love, you couldn’t do it through Twitter or email. You had to print it out and stick it to the wall.

Anyways, the algorithm is nothing amazing apart from its historical nature, but I implemented it in JanusNode coz, you know, I wanted to work with JanusNode and this looked straightforward enough. The first Love Letter above (in caps) uses words taken from David Link’s implementation and its output looks a lot like the 50s implementation. The second Love Letters (not in caps) uses words taken from various JanusNode files, which is why it sounds more surreal. Obv. if the words are picked for the occasion, the resulting poems will sound more appropriate.

anyways, the code looks like this:

100  e_strachey_salutations1 100  e_strachey_salutations2 100 "," 100 return 100 "        " 100 TextDemonStratcheySegmentClassic 100 TextDemonStratcheySegmentClassic 100 TextDemonStratcheySegmentClassic 100 TextDemonStratcheySegmentClassic 100 TextDemonStratcheySegmentClassic 100 return 100 "                                " 100 "YOURS" 100 e_strachey_adverbs 100 "," 100 return 100  "                                " 100 "M.U.C." 100 return 100 return 100

this is what the first couple of lines mean:

100 the first ‘100’ means this: when JanusNode generates from a file of rules, JanusNode randomly picks a line, then looks at the very first number to see the percentage chance that the line will fire. So this line will file 100% of the time. Since it’s the only line in the file, this isn’t a big deal.
e_strachey_salutations1 100 the next two characters mean: pick and print a word from the file called e_strachey_salutations1. do this with 100% certainty. the e_strachey_salutations1 file is in the ‘BrainFood’ directory, btw
e_strachey_salutations2 100 pick and print a word from the file called e_strachey_salutations2. do this with 100% certainty
“,” 100 return 100 ” ” 100 print these characters with 100% certainty
TextDemonStratcheySegmentClassic 100 run the TextDemonStratcheySegmentClassic rule with 100% certainty. The TextDemonStratcheySegmentClassic rule is in the ‘TextDemons’ file, btw. that means that it’s like a function or a method that you can call from anywhere

That should give you a sense for writing JanusNode rules. The documentation has a pretty good ‘Hello World’ and other simple rules to try out. If you can handle Gnoetry on Linux, you can handle writing JanusNode rules.

Anyways, if for some reason you want to try this out in JanusNode, you can get the rules I used here; maybe once I clean them up a bit I’ll send them to the JanusNode developer. JanusNode is here, of course. OK, later!

Advertisements
8 Comments leave one →
    • eddeaddad permalink*
      July 18, 2010 12:55 am

      > markov-chains-featuring-sarah-palin-and.html

      lol I dig it. you should post here.

  1. July 19, 2010 7:19 pm

    Thanks for the compliment. I gotta stick to my own place though, as I post very few words in any case…

  2. eddeaddad permalink*
    July 20, 2010 12:53 am

    > I should really fire up the “by character”
    > Markov chaining for her

    With “refudiate”, the change is syllabic. It’s in the same genre as created words like “chillax” and “laxadaisical”. In each case, given a term a single syllable is replaced by another syllable to create a substring that is a word (or a part of a word) that is related to the original term.

    refudiate
    – begin with “repudiate”
    – replace “pu” with “fu”
    – the new substring “refu-” brings to mind “refuse”, which is related to “repudiate”

    chillax
    – begin with “relax”
    – replace “r” with “chill”
    – the new substring “chill” is related to “relax”

    laxadaisical
    – begin with “lackadaisical”
    – replace “lack” with “lax”
    – the new substring “lax” is related to “lackadaisical”

    I’m not sure what the rhetorical or linguistic term for this is (UPDATE: it’s a portmanteau, duh), but it looks like it could be pretty easily automated:

    Given a multi-syllabic word w1,
    – use a thesaurus or wordnet to find the set of words R related to w1
    – replace a syllable s1 in w1 with a different syllable s2 to create w2.
    – for each word r in R, see if r and w2 have a common substring that includes s2. if so, output w2.

    You might have false positives that you’ll need to catch somehow. Given the runtime you’ll never find every possible combination, but you can start searching through wordnet or a thesaurus and make a twitter post every time you find a new one.

    I’ll probably never implement this, but I wanted to think it through. :)

    • July 20, 2010 2:08 pm

      JanusNode’ll give you an Ngram size to choose when Markov chaining by character: if you choose “2” to build the file and make it write “Loose” then “refudiate” seems possible but highly unlikely.

      I got “wantinue” which is a word with some potential.

      http://houseofsubstance.blogspot.com/2010/07/more-palin-markov-chains.html

      • eddeaddad permalink*
        July 20, 2010 4:48 pm

        > more-palin-markov-chains.html

        lol awesome:

        – instructure (a structure for instruction?)

        – perseverybody (persevere, everybody!)

        “…wow, Todd, now peaking…”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: