Skip to content

Sketch: WpN

March 1, 2011

WpN (pronounced “whuppin” or “weapon”). A generalization of the Oulipo w ± n algorithm. It’s Javascript, check it out.

According to those OULIPO folks, a generalization of n+7 is w ± n (replacing a given word in a text with the nth word in a dictionary before/after that word.) The WpN interface emphasizes the person (WpN, geddit?), by giving them the ability to replace any word in any text with any other word from any other text.

You’re basically taking a poem, and replacing certain words in it to make a new poem.

  • The Template Text is where you put the original poem which will provide the basis for the new poem.
  • The Static Words determine which Template Text words will not be editable and/or which Input Text words will not be available for selection.
  • WpN loosens the constraint of a read-only dictionary by providing a replaceable Input Text that can be used to select new words from. If you want to paste a dictionary of nouns into the Input Text go right ahead, but you can also use a text you admire, a text you wrote, or a text you never thought would make good poetry.
  • When you press Display Editor, an Editor is generated to provide you with an input form to select a new word for each word in the original poem.

Maybe that makes no sense at all… lemme just show you a couple ways to use it:

1) Paste in a Template poem, cut away what you don’t like, decide what words to replace and keep, and what words you want instead:

2) Figure out how many words you want per line and set a template. Then figure out what words you want:

3) Do an Erasure (actually a strike-through, though you can also remove words):

4) or you can just do a w ± n as shown at the top of this page.

In fact, I think I can show that n+7, w ± n, WpN, and erasures are all related. Consider the following:

Definition: Substitution Family of Interactive Generators

Given (T, S, I, M) where
– T is an ordered set of tokens representing a text that will be modified to produce a new poem,
– S is a set of words representing those tokens in T that will not be modified,
– I is a set of words representing those words that will be used to replace tokens in T
– M is a selection method to perform the replacement that will produce the new poem

Then to produce a new poem from T:
for each t in T
    if t is not in S
        use the selection method to replace t with an i in I


In n+7:
– S is the set of words that are not nouns in the text T, and I is an alphabetically-ordered set of nouns from a dictionary.
– selection method: search for t in I. Let t’s position in the ordered set I be u. replace t with i(u+7).

In w±n:
– S is the empty set
– I is an ordered set of words in a dictionary
– selection method: as with n+7, but replacing t with i(u+n) where n is a parameter of the method

In erasure:
– S is the empty set
– I is an “erasure” word consisting of either a blank or a blacked-out word
– selection method: the human arbitrarily selects which words to erase

In WpN:
– S contains anything that the human wants
– I is any set that the human chooses
– selection method: the human arbitrarily selects which words to replace

(can someone knowledgable tell me if that looks right? I suck at math, lol)

Anyway, I mostly wrote this because that “rstarr/poormfa” web page that had a diastic generator went down. I wanted to make sure we had a n+7 generator available in case the one we were using also died. WpN is client-side Javascript, so do a “Save Page” / “all” so you have it available in case I die in an earthquake or something.

No comments yet

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: