Janelle Shane, a research scientist and machine-learning hobbyist who previously trained her neural networks to come up with some brilliant craft beer names and Halloween costume ideas, is back again – this time with a neural network that writes Christmas carols.

Usually, Shane's AI experiments do work pretty well. Her neural network has given us really interesting craft beer names, one of which, The Fine Stranger, has even been taken.

However, on this occasion, things didn't turn out as they were supposed to and the machine learning algorithm produced some hilarious results when tasked with writing Christmas carols.

Just like most machine learning programs, Shane's neural network also works by learning and imitating a massive dataset, which, in this case, were 240 new and old Christmas carols compiled jointly by The Times of London and neural net hobbyist Erik Svensson.

This list included carols like "What Child is This?" and "Grandma Got Run Over by a Reindeer".

But as the network did not have any knowledge about Chrismas carols or any defined patterns of imitating that particular dataset, it started defining its own random rules and came up with some terrible results such as this one – a a a na snn aca naa i s a i aa a a n a uugna nn na i a uaa a a i a a a a a sna aagt o aa.

The initial output was quite poor. However, the neural network made some amends after comparing it with the real carols. This led it to produce a slightly better carol with proper structure, line breaks, and capitalized initials:

Walkin' him love, Dingle bells, jingle bells, jingle bells with bells are ringing

The cattle around the Christmas will be
A very special Christmas with me

"Happy Holiday
When the snowflakes will call the world wakes to bring
Glory bears and asses the air the angels sang
And Christmas tree"

"Santa baby, a blitzen,
And he was the sun and reindeer and earth.
The Saviour of the chimney tonight"

The fire is sleeping.
And crying,
Love love
What a King

With a heart reindeer
But no more a stranger.
Santa baby, and Dancer, and Curry down

Though the carols still did not make full sense and pretty funny, they at least sounded joyful, says Shane. The researcher has published the complete list of these carols on her blog.