Projects

MopjesBot

Twitterbot making Dutch puns about the news

View MopjesBot

MopjesBot cover

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 @MopjesBot
Het is een Belgisch politicus en is edelsteen?

Koen Steens!
MopjesBot @MopjesBot
Het is een Belgisch politicus en is fopspeen?

Koen Speens!
MopjesBot @MopjesBot
Het is een Belgisch politicus en is enig?

Koen Eens!
MopjesBot @MopjesBot
Het is een Belgisch politicus en heeft de bedoeling?

Koen Meens!
MopjesBot @MopjesBot
Het is een Belgisch politicus en is wilg?

Koen Weens!

Algorithm

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:

  1. 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.

  2. Replace the relevant syllables of the input name with the rhyme word, e.g. Kanye Rest.

  3. 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.

  4. 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”.

  5. 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:

  • bik·ker
  • ke·tel·bik·ker
  • knik·ker
  • steen·bik·ker
  • dik·ker
  • pik·ker

Struck out: more syllables than kikker. Of the others, it prefers a common word.

Describe the name and the rhyme

Wikipedia Kermit de Kikker

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 …”

Wiktionary pikker

iemand die iets steelt met de handen

“someone who steals something with their hands”

Fill in the template

MopjesBot Riddle

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.

View MopjesBot

Talks about MopjesBot

In the press

Paper

What people say about MopjesBot

All projects