This is the third installment of my experiment to leverage machine learning for creative writing. In the first installment, the RNN model was utilized to train text prediction based on characters. In the second installment, the pre-trained T5 model was fine-tuned on a range of sequence length, from 1 to 512 words. For the third, I had originally planned to train the ML model through data categorization, by decomposing each story into major events. The structure to build a story includes 6 major events:
– Exposition establishes characters and setting.
– Inciting Incident is an event putting the characters into a challenging situation.
– Rising Action or Progressive Complications is the largest part of the story, where most of the conflict takes place.
– Dilemma is the moment when a character is put into a situation where they must make an impossible choice.
– Climax is the big moment! The character’s choice from the dilemma drives the outcome of the conflict.
– Denouement is the end of the story. It includes the resolution and conclusion.
During T5 training, the model produced outputs to enable short stories for sequence lengths of 128, 256, and 512 words. Results were encouraging, entertaining, and demonstrating Andersen’s writing style. They answered the goal of the experiment, which is to write a story in his style.
Deviating from the original plan, I decomposed one story into six major events, each event being an input into the model. Each input was run repeatedly to produce different outputs. The outputs of each iteration were curated and pieced together into a single story. Most interesting was seeing the similarities between these stories and the original one, but also how they differ. Like a lore being told from lips to lips, being seen from eyes to eyes, it shifts shapes and accentuates different forms and stresses.
THE STORY: A ROSE FROM HOMER’S GRAVE
All the songs of the east speak of the love of the nightingale for the rose in the silent starlight night. The winged songster serenades the fragrant flowers.
Not far from Smyrna, where the merchant drives his loaded camels, proudly arching their long necks as they journey beneath the lofty pines over holy ground, I saw a hedge of roses. The turtle-dove flew among the branches of the tall trees, and as the sunbeams fell upon her wings, they glistened as if they were mother-of-pearl. On the rose-bush grew a flower, more beautiful than them all, and to her the nightingale sung of his woes; but the rose remained silent, not even a dewdrop lay like a tear of sympathy on her leaves. At last she bowed her head over a heap of stones, and said, “Here rests the greatest singer in the world; over his tomb will I spread my fragrance, and on it I will let my leaves fall when the storm scatters them. He who sung of Troy became earth, and from that earth I have sprung. I, a rose from the grave of Homer, am too lofty to bloom for a nightingale.” Then the nightingale sung himself to death. A camel-driver came by, with his loaded camels and his black slaves; his little son found the dead bird, and buried the lovely songster in the grave of the great Homer, while the rose trembled in the wind.
The evening came, and the rose wrapped her leaves more closely round her, and dreamed: and this was her dream.
It was a fair sunshiny day; a crowd of strangers drew near who had undertaken a pilgrimage to the grave of Homer. Among the strangers was a minstrel from the north, the home of the clouds and the brilliant lights of the aurora borealis. He plucked the rose and placed it in a book, and carried it away into a distant part of the world, his fatherland. The rose faded with grief, and lay between the leaves of the book, which he opened in his own home, saying, “Here is a rose from the grave of Homer.”
Then the flower awoke from her dream, and trembled in the wind. A drop of dew fell from the leaves upon the singer’s grave. The sun rose, and the flower bloomed more beautiful than ever. The day was hot, and she was still in her own warm Asia. Then footsteps approached, strangers, such as the rose had seen in her dream, came by, and among them was a poet from the north; he plucked the rose, pressed a kiss upon her fresh mouth, and carried her away to the home of the clouds and the northern lights. Like a mummy, the flower now rests in his “Iliad,” and, as in her dream, she hears him say, as he opens the book, “Here is a rose from the grave of Homer.”
Output Text:
seq_length = 128; iteration = 10
The wind whistled in the east, and the rose smelt sweetly. Then the nightingale sung his songs, and the rose trembled in the wind. Then the nightingale sung his songs again, and this time he was the happiest of men.
The nightingale sung his songs, but the rose was silent. Then a hail of death rolled over his head, and fell from the flower into the earth. The son of the poet found the dead bird, and laid it in the grave of Homer, who had sung the great poem, and the rose in the wind. The wind blew cold through the door, and the window sunk into the earth. The leaves of the rose trembled as the storm swept over them; they were torn by the storm, and they fell with the wind. The rose was taken away to the land of England. “Here I am, I am the home of the poet,” said the rose, “the home of happiness. Away, away!” And the earth kissed her lips, and the rose burst into tears.
The poet gave a rosy kiss upon her mouth, and said, “We must go to sleep, for the night is come.” The night was long, but as the rose had slept it seemed to have passed away. Then the rose awoke from her dream. The journey had carried her home with him. “Heaven preserve us!” he exclaimed in the book, “Here is a rose from the grave of Homer.” He had come to her, and she kissed him again, and arose, as if from the grave of Homer.
seq_length = 128; iteration = 13
“I saw a rose in the hedge beneath the holy temple, where the nightingale sang. I kissed it, and the sun kissed my warm, fragrant lips. It was love that fell on my cheeks,” said the camel-driver, and the rose smelt sweet perfume.
The poet had plucked the rose, placed it in a book, and carried it away to Iceland. He told her of the golden treasure in the book of poetry. He told her what he had seen in the dream. “Oh, I am only a dreamer, but I am traveling on a budget.” Then the rose heard the song again, and it was as if she had come from the land of the sun. “Then I shall read the whole book, and write my own poems; but I shall not read all the time, for it is so tedious and time-consuming.” And the rose remained standing there as a stillness, while the clouds lifted her up in the air, and sang to her in the sweetest voice of the land.
A king’s daughter, a beautiful princess, whose heart is still young and beautiful. She has a little pride in her beauty, fond of flowers, and never lets herself be carried away. He has given her a rose from the grave of Homer, and she will keep it with her. He kissed her on the forehead, and her eyes rested on the rose, which is the heart of Homer.
seq_length = 128; iteration = 14
The nightingale sung, and the rose spread her fragrance. “It was a beautiful rose. Never have I seen such flowers before,” said the camel-driver, “they are much larger than the tiger-lily that I saw in my childhood.
“His name is unknown, but my rose is not the one in the world I seek.” And the nightingale drew back the leaves, and lay in the rose’s bosom, dead and buried in the grave of Homer. He has a golden crown on his head, a cross, a long, red rose, and a beautiful wreath on his breast, as if it were the wreath of love for Homer.
seq_length = 128; iteration = 15
“A rose from the grave of Homer flies in the wind,” said the poet. “The poor rose does not bloom. It is too lofty to be of any use. The rose from the grave of Homer is not good for anything.”
Then the sun kissed it, and the rose trembled in the wind. The song soared up from the grave, and lay like a great hymn, as the swan’s plumage. The rose looked down upon the mountains, the shadows hung down over them, and a peasant boy sat by the window. He had seen the rose in her dream. “Oh, what beautiful poetry!” said the boy, “I have never seen such a thing in my life as to be found in a rose-bush.”
A rose grew in the garden, and close by the rose stood a nightingale’s grave. “Here rests the great poet in the garden of England,” said the rose, “the love of God has poured forth from His lips and from His holy will.” The sun shone in upon the woodland, the birds sang, and the wind kissed the homely rose.
seq_length = 128; iteration = 17
Then footsteps came by, and a kiss upon her lips, as if she had been the beautiful rose from the forest. The poet himself took the rose, placed it in his book, and told it to her. He told her of the winter days and the summer days; of the soaring, singing voice of the stork. “Oh, what beautiful poetry!” she exclaimed, as she sung it. “Oh, what beautiful poetry! I shall never forget it!”
“Then it will be all over with me,” said the poet. Then the poet sung again, and this time he was able to remember his visit to the swan’s plumage, and a nightingale with its fragrant necks, and a camel-driver accompanied his camels on his journey.
The rose was in full bloom. The little son of the poet took the rose and placed it in his grave. The sun kissed it, and the rose trembled in the wind. Then he placed the swan’s plumage into the mouth of the poet. The rose spread her fragrance, and the nightingale sung his songs over the grave.
seq_length = 128; iteration = 18
A rose from the garden grew; it was a beautiful sight to behold. A nightingale was singing, “Near yonder narrow road, the road led through a forest of rose-bush; there sat a young princess, young and beautiful, with her white neck and black eyes. She was thinking of her wedding.” The evening came, and the rose wrapped her leaves more closely round her, and dreamed; and this was her dream.
Footsteps came by, footsteps from the north, and from the rose’s mouth came a song of praise, stirring upward from the words of the poet; He had a handsome young wife, sweet as roses, beautiful as his own daughter. He had a brilliant mind, and could write words that are often uttered without knowing their meaning; and so in a few minutes he opened the book, and took the little girl in his arms, and whispered, “Here is a rose from the grave of Homer.” And then he gave her the rose, and she kissed him and hugged him, and they are so sweet and lovely.
