Setting Sale on a Discounted Mentor Ship

Who am I? (24601)

It was my senior year of high school when someone told me that puns are playing with language. That resonated with me and I decided then and there to get good at puns. That was eight years ago and I’m pretty great at punning now, to the point where I can get lost in workshopping a phrase to make the wordplay in just a bit better.

Meanwhile I work on a devops team and optimize servers in various ways, getting the syntax just right in a bash loop or combing through logs for that one errant message.

The biggest gap in my toolbox is that I’ve never gotten functionally literate in a programming language. I joined ChiPy’s python mentorship program to rectify that.

The void stairs up to level two

There’s a particular satisfaction in making a pun that takes someone a moment to understand. That moment of thinking, processing, turning over the meanings overlaid onto a sentence illustrates how complicated understanding puns is in terms of what’s happening inside someone’s brain as they figure out which word has additional meaning or what change has been made to introduce humor into an otherwise blasé sentence.

It’s that difficulty that has made a lot of people I’ve told about this project react with incredulity. Understanding puns is, from a computational perspective, extremely advanced and most likely could well be a life’s work.

Making puns though, to me that’s a different story. Making a pun requires adding a meaning to a sentence. To say ‘udderly’ rather than ‘utterly’ means that in addition to an adverb noting how absolutely without qualification something is I am now also talking about cow mammaries. We as humans can grasp both meanings of the word because they sound similar. The similarity in sound is one primary means of making puns that I intend to work with. These are what I refer to as homophonic puns, where their similarity in sound presents an opportunity to add meanings.

Further, when two people are making puns back and forth at each other, they’re creating subject matter puns. That is, there is the primary subject of the sentence as well as the subject within which puns are being made.

Trees are a common subject matter pun I’ve found. An exchange of those might go as follows:

Punster One: “Leaf me alone!”

Punster Two: “No, I’m trying to branch out.”

Punster One: “Well then you’re barking up the wrong tree.”

Punster Two: “Look, can we just get to the root of the problem?”

Punster One: “Fine, I’ll chlorofill you in.”

These two people are talking about a disagreement and the first one eventually agrees to fill the other person in on the missing details.

Meanwhile, any additional word that can be made to have to do with trees is an additional pun.

They imposed a Syntax on linguists, they could not be reached for comma

I know a couple of linguists, and through the little bits and pieces of knowledge I’ve gleaned from knowing them I’ve managed to put together the right questions to ask.

To tackle homophonic puns I’m working with phonemes, that is, sounds. Splitting words up by phoneme rather than letter means that words like “oh” and “though” which have the same ending sound can be directly compared. This is much easier than trying to code for all of the weird sounds that letters make throughout the english language.

For subject matter puns I intend to compare words based on their synonyms and subjects to make as many words as possible in a given string have to do with the same subject. I’m doing this through dictionary definitions to approximate subjects and a thesaurus to figure out which words can be substituted to begin with.

Slitherin’ in on a python

What I need to deal with wordplay in terms of homophonic and subject matter puns is as follows:

  1. A dictionary wth International Phonetic Alphabet (or equivalent) pronunciations
  2. A dictionary with definitions of words
  3. A thesaurus

I have data for all three of these things to varying degrees of quality, though I’ve only seriously worked with the pronunciation dictionary thus far. I’m striving to have all the data I work with be local to my machine purely because of the volume of comparisons I intend to make across every word in the dictionary for every word of input.

Thus far it’s been a lot of fun playing with the data, I’ve gotten to think about algorithmic efficiency, proper handling of large files, and data structures in what I’ve made.