Project Breadcrumbs: Fairy Tale Text Generation

Maddie and Merissa

As Senior Computer Science majors taking both Natural Language Processing (NLP) and Honors Literary Analysis this past semester, Maddie Louis and Merissa Tan found a common interest in the intersections of NLP text generation and fairy tales. They therefore decided to embark on a mission to teach machines how to write fairy tales.

The paragraphs below are sample stories generated by language and text-generation models that have learned from the works of prominent fairy tale authors. The models are given a prompt which are italicized in the text. The word clouds showcase the most common words in these generated texts.


Model learned from Brothers Grimm’s tales

Sample Generated Text #1

Alone in the woods was a small girl in a red cape. She was on her way to bring bread to her grandmother.

‘Well, grandmother,’ thought the cook, ‘how can I make money from her, and cook my meal for you?’ ‘Alas,’ said Gretel, ‘I will eat only my bread’s half.’

Then she took a red apple, and nibbled at it until she was satisfied. Then she thought: ‘I should like to get some for you, but I have no one I can reach.’

At last she gave up the apple, and went home satisfied. With the exception of a few days when she had a little cow, the wild goose were very lucky.

They came all the time to their great-great-great-grandmother to have their dinner, and had so very little that no one could get in.

Sample Generated Text #2

Out in a cave, there lived a horrible beast. Nobody dared go near it, and the cave remained untouched by the nearby village for thousands of years. But that was only the beginning.

At last, a fisherman and his wife found shelter under a hillock, and heard the strange sounds of the beast, when it was about to leap upon their boat.

They soon fell down upon one another, and as they had come to the place where the monster had been, the fisherman got up and tried to throw him on the top of his boat.

The monster began to run after him with great speed, and began to sing and dance under the water.

‘Oh dear God, give me a break,’ cried the fisherman, ‘give me a break,’ as it sprang off the top of his boat again. But the fisherman sprang back, and, seeing that the monster was no longer there, went down again to the water.

‘Pray swim away,’ said he, ‘you can’t swim away,’ but he clambered out of the water, and said: ‘Oh dear God, grant me a break,’ and clambered on again; and again, he ran upon his boat as fast as he could.


Model learned from Hans Christian Andersen’s tales

Sample Generated Text #1

Far underneath the sea, there lives a young princess who has seven sisters.

Their names are Charlotte, Charlotte, Charlotte; they are all beautiful, and one of them is a little daisy; she is beautiful, and Charlotte is beautiful.

The daisy is not only Charlotte but also Charlotte who also is a lovely human being, because in her soul she lies, and does her bidding; she is the one who knows what is at stake in the future.

Charlotte can neither lie nor lie about herself, so that nothing in the world may be expected of her. But the little daisy can be held together and strengthened by the love which she gives to it.

Charlotte is a girl who can be read; but the book she is reading is nothing, because she has never read the book she had intended to read, but only a sketch, for the drawing will remain for years; she cannot think of that again.

Now when she looks at the daisy, she sees a young angel, and a beautiful girl, but she cannot perceive them. She cannot see them, for the angels are not there.

The little daisy is sitting up in her arms, and the little angel has been kissing her, and they are kissing her heart, and her lips are moving through the air.

Sample Generated Text #2

Once upon a time there was a young girl who was the fairest of them all. Her sisters were jealous of her beauty. She was beautiful, they believed.

And when she was about ten years old she was married to a noblewoman.

The girl was very clever, and had all the qualities, while her mother believed that this girl should never have a chance to be with her; so that she had no chance of ever being with her.

The only thing which the daughter of her master could wish to know was how she was to remain in a kind home with the noble people of her birth–in which the mother remained for half a year, and the child was always with her. It was a very beautiful time, in the summer.

The Dryad came out of the country in winter to visit her, which was certainly of great importance; so it was very pleasant and interesting to see her, to have her, and to see all her beautiful gifts.

The Dryad had a splendid home in the town; a pleasant house that had been built on top of hers; and a splendidly furnished yard; but the whole arrangement was only to give the dryad much entertainment; and so she became quite convinced that the house, in which she lived, was to serve as her home.


Model learned from Charles Perrault’s tales

Sample Generated Text #1

Alone in the woods was a small girl in a red cape. She was on her way to bring bread to her grandmother.

Now this poor thing had got a good deal of money out of the boy, and had given him money to buy a pretty little hut, which he had cut up on the outskirts of town.

Now this little hut was called The Fox’s Fair, because, as far as was known, it lay on a ridge above, behind the house, and was called The Fox’s Mountain, for the hill that is just at the top of this rock, over there a very dangerous place.

In the forest stood a deep ditch.

Here there was once a girl who was very kind, and to give good advice to the man who was to come out of the forest, and tell him why his brothers had got into this dangerous place; but he had a wicked old cap lying upon his head, as the poor little girl told him.

Sample Generated Text #2

A long time ago, there was a couple who wanted more than anything to have a child of their own.

The eldest was very fond of having one, and the other very fond of having two; so she laid hold of her father’s neck, and asked: ‘Dear father, do you wish to have a child?’ ‘Yes,’ replied the father, ‘but if my child be given to me I will give you to the poor girl, for she cannot bear to keep herself in this world.’

So she was given a little child, and by marriage her mother lived with her, and they lived for three years together very happy.

Then she sent them all up into the world, for they called the little people: and this the eldest sister did, and was called Rose-red, and was called Lily-red; and when she was old enough, and could go no farther, she left the little children to her, and set them to work and get wood, and make furniture, and clean the house; and it was not long before she got pretty well enough to draw some wood out of the wood, so as to put one in every corner of the house, to make beds, beds for her maidens, and cook the cook’s table, or whatever else she would like.


Project Report

css.php