Maarten Huijsmans
@lukin0110De moppen computer heeft mijn niveau van humor bereikt :) @MopjesBot wanneer gaan we op cafe?
MopjesBot@MopjesBotHet is een Frans politicus en is een voertuig?
Emmanuel Wagon!
Mopjesbot (Dutch for “little jokes bot”) is a Twitterbot that automatically creates puns about the news. The bot creates variations on the popular Dutch joke format called Kermit The Sticker:
Het is groen en het plakt? Kermit de Sticker!
Every day, it picks a prominent person from the news and creates a set of five puns about this person. For example, it could tweet about Maggie De Block:
Het is een Belgisch politica en bepaalt een dierenverblijf?
Maggie De Hok!
Het is een Belgisch politica en komt tot net boven de enkel?
Maggie De Sok!
Het is een Belgisch politica en wordt om de taille gedragen?
Maggie De Rok!
Het is een Belgisch politica en is een zweertje?
Maggie De Pok!
Het is een Belgisch politica en vertelt een relatief onschuldige leugen?
Maggie De Jok!
Het is een Belgisch politica en bereidt voedsel tot een maaltijd?
Maggie De Kok!
Or about Koen Geens:
MopjesBot
@MopjesBotHet is een Belgisch politicus en is edelsteen?
Koen Steens!
MopjesBot
@MopjesBotHet is een Belgisch politicus en is fopspeen?
Koen Speens!
MopjesBot
@MopjesBotHet is een Belgisch politicus en is enig?
Koen Eens!
MopjesBot
@MopjesBotHet is een Belgisch politicus en heeft de bedoeling?
Koen Meens!
MopjesBot
@MopjesBotHet is een Belgisch politicus en is wilg?
Koen Weens!
MopjesBot uses Wiktionary and a thesaurus to find ways to describe words, Wikipedia for finding who famous people are and a rhyming dictionary to find proper rhymes for the puns. It also scrapes names from the news to find the appropriate butt of the jokes.
For example: Given the name Kanye West as input, it would perform the following steps:
Find a rhyme on the last word with the same number of syllables, e.g. rest. If the last word of the input has multiple syllables, look for rhymes on any combination of consequent syllables. Prefer more common words using a word frequency list if this is available in the language of choice.
Replace the relevant syllables of the input name with the rhyme word, e.g. Kanye Rest.
Use Wikipedia to find a nice description of the entity with the input name. This is not that hard to extract from the Wikipedia page since the introduction usually starts with [entity_name] is/was/are [explanation]. By taking the part after the “to be” verb and until any punctuation or start of the clause, the program can distill a brief description. For example, it would describe Kanye West as an American rapper.
It now only has to describe the rhyme word to complete the pun riddle. To achieve this, either a thesaurus (for short descriptions) or segments from Wiktionary (for longer, more interesting descriptions) could be used. The algorithm should, however, make sure that the description does not contain the word to guess itself since that would spoil the fun. The word frequency table could also be used to choose less common (and thus more specific) descriptive words. For example, it could describe rest as “relief from work”.
Now it can fill all these words into the template, to create the following joke:
It’s an American rapper and is relief from work?
Kanye Rest
These jokes tend to become more interesting once you have multiple, as they turn into a fun guessing game. Luckily, given this completely automated generation process, the described program can easily generate many related jokes.
Here are the same steps in Dutch, for the name in the joke format MopjesBot imitates:
Kermit de Kikker Kermit the Frog
Rhyme on the last word, with as many syllables
Kik·ker 2 syllables. Rhymes:
Struck out: more syllables than kikker. Of the others, it prefers a common word.
Describe the name and the rhyme
Kermit de Kikker is een muppet die in de jaren vijftig werd bedacht door Jim Henson …
“Kermit the Frog is a muppet who was thought up in the fifties by Jim Henson …”
iemand die iets steelt met de handen
“someone who steals something with their hands”
Fill in the template
MopjesBot Het is een muppet en het steelt iets? Kermit de Pikker!
“It is a muppet and it steals something? Kermit the Pincher!”
Pikker (“pincher”) rhymes with kikker (“frog”). From Wikipedia’s first sentence about the name, MopjesBot takes the words after is, up to a comma, a new clause or a preposition. From the rhyme’s definition it takes an action, which makes a funnier clue than a synonym. It also skips puns it made before, and people it joked about recently.
This system is thus able to generate jokes following a specific template and schema, but also nudges the jokes to have a higher probability of having certain characteristics (e.g., common or less common words in certain template slots).
You can read more about the inner workings of this algorithm on our research group blog.
Automatic Joke Generation 2017 My master's thesis about "Automatic joke generation: learning humor from examples"
RobBERT Humor Detection 2020 Distinguishing jokes from generated non-jokes, creating the first Dutch humor detectors
SamsonBots 2017 Six interacting Twitterbots based on Samson & Gert characters, an early multi-agent experiment
Twitterbots 2015 Various little Twitterbots I made over the years