How FunnyBone Works

Funniness Scoring

FunnyBone uses AI to determine the funniness of a word. It starts off with a human reference point (i.e. a set of words whose funniness scores were manually marked), then it extrapolates this data using linear regression, a machine learning model, to predict the funniness of any arbitrary word. The predictions are then stored in a database for quick retrieval when needed.

What words to predict? The set of words comes from Datamuse. Incidentally, FunnyBone uses Datamuse's public API to find words that are semantically related to the user's prompt — the API and the database have the same vocabulary, so all possible outputs are given a funiness score.

The funniness scoring borrows ideas from Cockamamie Gobbledegook for Nincompoops, a NLP research paper.

Web App Interactions

The back-end for FunnyBone is a Flask app. When the page is loaded, the app reads the user's prompt from the URL query string. Then it finds candidate outputs using the aforementioned Datamuse API and retrieves their funniness scores from the database. The 3 funniest words, along with the unfunniest word, are noted.

All necessary information is passed on to the front-end, an HTML page generated through Jinja2 templating. When the user enters a prompt, the page is reloaded with the new prompt reflected in the query string, repeating the cycle.

Putting It Together

Here's a diagram of how everything fits together:

Back to the Main Page