Roses are #f00, violets are #00f. This witty code is a boffinry breakthrough
'I like my relationships like I like my kernel source... open'
What do you call a computer program that uses big data to write jokes? Basic, judging by the list of groan-worthy gags generated by this new wisecracking software.
Eggheads at the University of Edinburgh have developed code dedicated to spitting out quips along the lines of: "I like my men like I like my monoxide - odourless" and "I like my women like I like my gas - natural".
The system was tested on a group of volunteers who claimed the witty algorithms made them chuckle a few times, although not as much as similar, human-penned jokes chosen from Twitter.
It uses 2,000,000 noun-adjective pairs of words to draw up jokes "with an element of surprise", something the creators claim is key to good comedy. The one-liners were produced by searching for connections between pairings of words using Google n-gram data and Wordnet's part-of-speech tags.
Other jokes calculated by the software include:
- I like my relationships like I like my source code... open
- I like my boys like I like my disk sectors... bad
- I like my coffee like I like my war... cold
As snigger-worthy as they are, there's some way to go until computers are as funny as their human masters, said David Matthews of the university's School of Informatics, who wrote the program with Sasa Petrovic.
"Computers have an advantage over people in that they can process masses of information, so we fed computers a wealth of material from which they extracted creative and unusual word combinations to fit our joke template," he said.
"The holy grail for machine-generated comedy would be to include cultural references, but these are very hard to capture."
Speaking of cultural references, the academic paper describing the software is also amusing, in a nerdy way. Here's one extract as an example:
In the automatic evaluation we measure the effect of the different factors in the model … It is a local approximation to log-likelihood, and we therefore dub it LOcal Log-likelihood, or LOL-likelihood for short. Our second metric computes the rank of the human-generated jokes in the distribution of all possible jokes sorted decreasingly by their LOL-likelihood.
This Rank OF Likelihood (ROFL) is computed relative to the number of all possible jokes, and like LOL-likelihood is averaged over all the jokes in our development data.
For measuring LOL-likelihood and ROFL we use a set of 48 jokes randomly sampled from Twitter that fit the "I like my X like I like my Y, Z" pattern.
(An SQL statement walks into a bar, wanders over to two tables and asks: “May I join you?” ...we're here all week. For some commentards, months.)
Sponsored: Data Loss Prevention & Data Theft Prevention