Given minimal input the software generates jokes

Computer scientists in Scotland developed the program for children who need to use computerised speech aids.

The team said enabling non-speaking children to use puns and other jokes would help them to develop their language and communication skills.

The researchers admitted some of the computer-generated puns were terrible, but said the children who had tried the technology loved them.

The System to Augment Non-speakers Dialogue Using Puns (Standup) project has been developed by scientists at the Universities of Dundee, Aberdeen and Edinburgh.

Computer scientist Dr Annalu Waller, one of the project researchers at the University of Dundee, said: "Basically, the computer comes up with novel jokes - many of which are terrible."

"Children who are developing on a typical development track actually tell very unfunny jokes, so we have provided that facility for non-speaking children as well."

Funny bunny

Children using the software can choose a word or compound word, which will form some or all of the punch line, from the system's dictionary. The program then writes the joke's opener.

It works by comparing the selected word with other words in its dictionary for phonetic similarity or concepts that link the words together, and then fits them into a pun template.

Some examples of jokes the software has generated include:

What do you get when you cross a car with a sandwich? A traffic jam

What do you call a strange rabbit? A funny bunny

What do you call a frog road? A main toad

What do you call artist who is a minister? A pastor master

Dr Waller said children who are unable to speak can suffer from communication setbacks because their computerised speech aids can lack scope for generating novel language.

Language play, including use of humour, is believed to have a beneficial effect on a child's developing language and communication skills.

The software has recently been used in a 10-week trial at a school outside of Glasgow.

Dr Waller said: "The kids have been superb, they have taken to the software like fish to water. They have been regaling everybody with their jokes."

She said it seemed to have boosted their confidence as well as their language skills.

"It gives these kids the ability to control conversations, perhaps for the first time, it gives them the ability to entertain other people. And their self-image improves too."

The researchers are in talks with manufacturers to see if the software can be integrated into computerised-speech aids for children.