Experts in artificial intelligence have built a computer programme that can understand simple jokes, marking an important step in making robots seem friendlier to humans, the weekly New Scientist reports.
Previous attempts at getting machines to understand humour have failed miserably, because what is funny to humans is subjective and complex -- and fiendishly difficult to programme.
AdvertisementBut, says New Scientist, Julia Taylor and Lawrence Mazlack of the University of Cincinnati in Ohio have devised a prototype joke-detection software.
They began by loading a programme with a database of words, extracted from a children's dictionary to keep things simple, and then supplied it with examples of how the same word can have different meanings depending on the context.
When presented with a text, the programme uses that knowledge to work out how new words may relate to each other, and what they probably mean.
If it fails to find a word that matches its context, it rummages around in a digital pronunciation guide for similar-sounding words.
And if any of those words are a better fit for the rest of the sentence, the passage is flagged, ha ha, as a joke.
So far, the joke-bot only understands rather leaden puns and still delivers a blank look when facing more complex stuff or dead-pan humour.
Even so, the researchers hope it will add a kindlier touch to robots of the near-future which will act as human companions or helpers.
Here's an example of what tickles a circuit board:
- Mother to boy: "My, you've been working in the garden a lot this summer."
- Boy: "I have to, because teacher told me to work a lot" (thus a pun on working the soil and doing schoolwork).
The research, reported in next Saturday's New Scientist, was presented last week at a conference of the American Association for Artificial Intelligence in Vancouver, Canada.