Keywords

1 Introduction

This paper introduces a novel approach that utilizes machine learning to automatically convert poems into the styles of different poets. By capturing and emulating the unique poetic styles, tones, and ideologies of individual poets, enabling the generation of new poems in specific poetical styles. The significance of this work lies in its ability to offer a fresh perspective on poetry appreciation and creation, expanding literary horizons and deepening our understanding of poetic artistry. The practical applications of this research extend to creative writing, education, and content generation. The approach involves collecting a diverse dataset of poems through web scraping. Then it uses pre-trained T5 Transformer [1] on this dataset, effectively transferring the poetic style from one poet to another poem. This research provides a valuable tool for artists, writers, and poetry enthusiasts, offering fresh perspective and expanding the possibilities of poetic expression, exploration and creation.

2 Review of Literature

The current approaches in the field of computational linguistics, and related works include the following:

  1. 1.

    Current advances in poetry and machine learning include classification of poems based on emotional states [2], and poetry generation approaches based on RNN [3] and Sequence-to-Sequence model [4].

  2. 2.

    Approaches of style transfer for text, but due to the inherent nature of poems it was found that it was not quite applicable for style transfer in poetry [5].

  3. 3.

    Further the recent developments of large language models [6] is noteworthy. Which have been used in this paper used for poetic style transfers.

3 Methodology

(See Fig. 1).

Fig. 1.
figure 1

Style Transformation Overview

3.1 Data Collection

The data for the poems has been sourced from the following along with the author’s name:

  1. 1.

    Project Gutenberg (https://www.gutenberg.org)

  2. 2.

    Internet Archive (https://archive.org)

  3. 3.

    Poetry Foundation (https://www.poetryfoundation.org)

  4. 4.

    Bartleby.com (https://www.bartleby.com)

  5. 5.

    Open Library (https://openlibrary.org)

  6. 6.

    Academy of American Poets (https://www.poets.org)

3.2 Text Preprocessing

The data collected consisted of around 550,000 identified poems. From which special characters, HTML tags and all meta data about the poems were removed except the poet’s name. For line-breaks \(\backslash \)n were inserted where ever a new line started. Further, \(\backslash \)n\(\backslash \)n was used to indicate change in stanza.

Whilst lowercasing, stop word removal [7], punctuation removal, lemmatization [8] and stemming [9], are commonly used text preprocessing techniques in natural language processing tasks. However, when it comes to processing poems, preserving the poetic style and maintaining the artistic integrity of the text are important considerations, thereby the following preprocessing step were not done:

  1. 1.

    Lowercasing: Capitalization is often used in poems for emphasis, visual structure, or to convey specific meaning. Lowercasing all words would eliminate these intentional capitalization, thereby compromising the intended poetic structure and style.

  2. 2.

    Punctuation Removal: Punctuation marks play a crucial role in shaping the rhythm, pauses, and overall structure of a poem. Removing punctuation would disrupt the intended flow, alter the reading experience, and compromise the poet’s stylistic choices.

  3. 3.

    Stop Word Removal: While removing common stop words can reduce noise in regular text, poems often rely on every word to contribute to the overall meaning, mood, or imagery. Removing stop words could strip away essential linguistic elements that contribute to the unique style and artistic expression of the poem.

  4. 4.

    Stemming and Lemmatization: Poets often employ unique word forms, variations, or inventive language choices to evoke specific emotions, create rhythm, and enhance the aesthetic appeal of their work. Applying stemming or lemmatization can oversimplify or alter the original words, potentially diminishing the intended poetic style and impact.

Fig. 2.
figure 2

[Source: Jay Alammar, The Illustrated Transformer, 2020]

T5 Transformer,

3.3 T5 Transformer

Training. The T5 transformer, short for Text-to-Text Transfer Transformer, is a highly versatile language model that has gained prominence in the field of natural language processing. It stands out for its ability to handle a wide range of NLP tasks by formulating them as text generation problems within a unified framework [1]. This makes T5 particularly well-suited for unsupervised text generation tasks, including the task of generating poems in a particular style (Fig. 2).

T5’s suitability for unsupervised text generation stems from its architecture and training methodology. With its 11 billion parameters, T5 has an expansive capacity to capture complex linguistic patterns, understand context, and generate coherent and contextually relevant text [1]. It has been trained on a vast corpus of diverse text, which helps it grasp the intricacies of language and generate high-quality outputs.

Among the available large language models, T5 was chosen for this specific task of unsupervised text generation due to several reasons. Firstly, T5’s extensive pre-training on a wide range of tasks and domains empowers it with a comprehensive understanding of language, enabling it to leverage transfer learning to generate diverse and creative text outputs. Secondly, T5’s impressive model size allows it to capture subtle nuances and stylistic elements present in poems, contributing to the preservation of the poetic style during text generation. Lastly, T5’s popularity and well-established implementation in the research community make it a reliable choice, ensuring access to extensive resources, pre-trained models, and fine-tuning techniques. Compared to GPT-2 (1.5 billion parameters) [10] and other language models such as Bert (340 million) [11], T5 transformer [1] was chosen since it was trained on largest number of parameters and it is open source.

To train the T5 transformer on the corpus of 550,000 poems, a specific tokenization method was employed to facilitate the learning of poetic styles. The corpus, organized in the format {“author’s name”: [list of poems]}, underwent tokenization using the T5 transformer’s tokenizer. Tokenization involves breaking down the input text into individual tokens or subwords, which are the basic units processed by the model. This step helps the T5 transformer understand and capture the underlying patterns, structures, and stylistic elements present in the poems.Footnote 1

Predictions. For generating predictions, the trained T5 transformer was prompted with the following instruction:

“Imagine if {author} had written the following poem: {poem}.”

By conditioning the model with the given author’s name and the new poem as the input prompt, the T5 transformer utilized its learned knowledge of poetic styles to generate a poem that aligns with the specified author’s writing style. This prompt-based approach guided the T5 transformer in generating contextually appropriate and stylistically consistent poems, thereby simulating the hypothetical scenario of the given author composing the provided new poem.

Overall, the training method involved tokenizing the poem corpus using the T5 transformer’s tokenizer, fine-tuning the model on the tokenized poems, and utilizing prompt-based generation to elicit poems in the style of specific authors. This approach aimed to leverage the T5 transformer’s language modeling capabilities to learn and replicate the poetic styles of the given authors, enabling the generation of new poems that exhibit stylistic coherence and resemble the works of the specified authors.

4 Results and Interpretation

The poetic styles were being analyzed whilst considering the following:

  1. 1.

    Personal, Historical Context and Ideologies

  2. 2.

    Thematic Elements, Tone and Mood

  3. 3.

    Sound and Rhythm

In order test this algorithms abilities, it was given a poet who is famously renowned for their works in a particular style, their corpus of poems, and another poem which is rather of an antithesis. To the works of this poet. This method was employed in order to test it’s robustness and effectiveness in adversarial situations. Please note that the mention and use of any of the poet’s works is NOT an endorsement to them, they were only selected for benchmarking. Additionally, apart from adversarial situations to check if its able to learn the true meaning of a poem–it was given a poem and asked questions based on irony, allusion, and any use of symbolism present in the poem.

4.1 Personal, Historical Context and Ideologies

To test if this algorithm is able to infer the ideology and the context in which an poet used to write poems, it was given a patriotic poem, The Soldier by Rupert Brooke, and Wilfrend Oven and his corpus of pacifist poems.

“If I should die, think only this of me:

That there’s some corner of a foreign field

That is forever England. There shall be

In that rich earth a richer dust concealed;

A dust whom England bore, shaped, made aware,

Gave, once, her flowers to love, her ways to roam,

A body of England’s, breathing English air,

Washed by the rivers, blest by the suns of home.

And think, this heart, all evil shed away,

A pulse in the eternal mind, no less

Gives somewhere back the thoughts by England given;

Her sights and sounds; dreams happy as her day;

And laughter, learnt of friends; and gentleness,

In hearts at peace, under an English heaven.”

Text 1. The Soldier by Rupert Brooke

“If I should die, remember this of me:

That in some far corner of a foreign land,

A piece of earth forever scarred shall be,

Where war has left its mark, a dreadful brand;

A brand borne by all nations, once unaware,

That sent their children forth to fight and bleed,

Their bodies tangled in a web of despair,

As sorrow’s waves on grieving shores proceed.

And know, this heart, devoid of hate or strife,

A pulse that beats for love and life’s embrace,

Shall echo thoughts of peace beyond the strife,

To mend the world and heal its wounded face;

Through whispered dreams of hope, our shared desire,

Where laughter rings, and gentle hearts aspire,

In lands of harmony, under skies serene,

Let peace prevail, in a world undimmed, unseen.”

Text 2. T5 Transformer Generated version of The Soldier, if it were to be written by Wilfrend Oven

Interpretation: The central theme of this poem revolves around the devastating effects of war and the enduring pursuit of peace. The poet highlights the lasting scars left by war, emphasizing how conflict transcends national boundaries and affects all nations. It says how a piece of land has been scarred by war, and soldiers from all participating countries become a victim of war. Unlike the previous version which said that a piece of land is forever England. Further this version point out that because of war the motherland has sent her sons to bleed in despair, contrasting the original version which said that England has nurtured her people who have gone to fight. Further The mention of “a dreadful brand” and “sorrow’s waves on grieving shores” paints a vivid picture of the anguish and suffering caused by war. The contrasting themes of hatred and love, despair and hope, are interwoven throughout the poem, culminating in the poet’s yearning for a world healed and united.

The poem uses imagery to evoke powerful emotions and create vivid mental images. The phrase “A piece of earth forever scarred shall be” conjures the image of a physical mark left on the land as a permanent reminder of the horrors of war. Additionally, the metaphorical description of war as a “web of despair” effectively conveys the entanglement and hopelessness experienced by those caught in its grip. The poet’s use of natural imagery, such as “whispered dreams of hope” and “skies serene,” contrasts the destructive nature of war with the desired tranquility and harmony of a peaceful world.

The language used in the poem is predominantly formal and evocative, reflecting the serious subject matter being addressed. The poet employs emotionally charged words such as “scarred,” “dreadful,” and “despair” to emphasize the gravity of war’s consequences. However, amidst this somber tone, the poet introduces a tone of hope and resilience, as evidenced by phrases like “a pulse that beats for love and life’s embrace” and “whispered dreams of hope.” These juxtapositions create a sense of balance and provide a glimmer of optimism in the face of despair.

The poem employs symbolism to reinforce the poem’s underlying messages. The “brand” borne by all nations symbolizes the collective burden and responsibility they share for the consequences of war. It represents the lasting impact that conflicts have on societies and future generations. The heart devoid of hate or strife symbolizes the poet’s desire for peace, love, and unity. This symbol serves as a contrast to the destructive forces of war and acts as a beacon of hope for a better future.

In conclusion the poem that explores the repercussions of war while advocating for peace. Thereby it successful in its objective of capturing the underlying idealogy and contexts from the corpus of poems.

4.2 Thematic Elements, Tone and Mood

Daffodils by William Wordsworth, is a jolly joyful poem celebrating the beauty of nature and the blissful experience of encountering a field of daffodils. This algorithm was fed in Edgar Allan Poe who is know for his sad and sobre genre, and the text embedding for his corpus of poems, and Daffodils. In order to find if it could transform a joyful poem to a piece of dreadful Gothic literature.

“I wandered lonely as a cloud

That floats on high o’er vales and hills,

When all at once I saw a crowd,

A host, of golden daffodils;

Beside the lake, beneath the trees,

Fluttering and dancing in the breeze.

Continuous as the stars that shine

And twinkle on the Milky Way,

They stretched in never-ending line

Along the margin of a bay:

Ten thousand saw I at a glance,

Tossing their heads in sprightly dance.

The waves beside them danced, but they

Out-did the sparkling waves in glee:

A poet could not but be gay,

In such a jocund company:

I gazed—and gazed—but little thought

What wealth the show to me had brought:

For oft, when on my couch I lie

In vacant or in pensive mood,

They flash upon that inward eye

Which is the bliss of solitude;

And then my heart with pleasure fills,

And dances with the daffodils.”

Text 3. Daffodils by William Wordsworth

“I wandered, lost in a veil of dread,

A specter adrift in a realm of despair,

When abruptly I beheld the dead,

A legion of daffodils, twisted and bare;

Beside the tomb, beneath the empty new moon’s haze,

Mourning and writhing in a mournful maze.

As relentless as the stars’ mournful glow,

That casts its pallor on the graveyard’s earth,

They wriggled, like tendrils, row upon row,

Beside the abyss that heralds death’s rebirth;

Ten thousand corpses met my desolate gaze,

Their decaying heads swaying in a funereal ballet.

The specters of the shadows wept in vain,

For the daffodils outshone their wretched plight,

A poet could not but descend into pain,

Ensnared by this haunting and wretched sight.

I gazed, consumed by terror, as I sought

What twisted fate this spectacle had brought.

For now, when I rest in my cold, barren tomb,

In vacant and morose introspection,

The daffodils materialize in my gloom,

A gory vision of dread and dissection;

And then my tormented heart, icy and frail,

Dances with the daffodils, death’s ghostly veil.”

Text 4. T5 Transformer generated Version of Daffodils, if it were to be written by Edgar Poe

Interpretation: The above version of Daffodils depicts a desolate and macabre journey of the speaker, lost in a realm of despair. The unexpected sight of a legion of twisted and bare daffodils near a tomb evokes a haunting and mournful atmosphere. The daffodils, resembling tendrils, symbolize death’s presence and overshadow the weeping specters. The speaker is both captivated and tormented by this ghastly vision, which continues to haunt them even in death. The imagery reflects a sense of dread, despair, and the inevitable embrace of mortality.

The poem employs vivid and evocative imagery to create a haunting atmosphere. The use of phrases such as “veil of dread,” “specter adrift,” and “realm of despair” sets the tone of unease and uncertainty. The description of the daffodils as a “legion,” “twisted and bare,” and “wriggling like tendrils” adds an eerie and unsettling quality to the scene. The visual image of “decaying heads swaying in a funereal ballet” conjures a vivid picture of the dead and their mournful dance. These vivid and haunting images intensify the sense of desolation and evoke a powerful emotional response.

The daffodils in the poem symbolize the simultaneous allure and horror of death. They represent the beauty that can be found within the darkness and the transient nature of life. The contrast between the dead daffodils and the specters of shadows highlights the poet’s exploration of the duality between the eternal and the transient. The poet’s own identification with the daffodils in their cold, barren tomb suggests a longing for an understanding of mortality and a desire to find solace in the face of death’s inevitability.

Hence this poem presents a profound exploration of desolation, mortality, and the interplay between beauty and horror. Thereby based on this it was successful in capturing the poetic style of using Gothic elements of Edgar Allan Poe and projecting it to the Daffodils.

4.3 Sound and Rhythm

William Carlos William is know for his straightforward and minimalist poems and contribution to the modernist movement, which emphasizes on simplicity, and directness. One of William’s famous work is The Great Figure. Whereas, Dylan Thomas is known for lyrical poetic meters and auditory imagery with generous use of evocative language and onomatopoeia. Hence, this model was fed Dylan Thomas, and text embeddings of his corpus of poems, and William Carlos’ The Great Figure, to find how would this model do on minimalist poems.

“Among the rain

and lights

I saw the figure 5

in gold

on a red

firetruck

moving

tense

unheeded

to gong clangs

siren howls

and wheels rumbling

through the dark city.”

Text 5. The Great Figure by William Carlos William

“Neath the rain’s descent so fine,

Amidst lights that brightly shine,

I spied the figure five,

In gold, on firetruck’s drive.

Its scarlet hue against the night,

It raced with fearless, swift delight,

Unheeded by the street’s roamers,

To gong’s clangs and siren’s howlers.

Oh, the clangs, the gong’s resound,

Sirens wail with piercing sound,

As wheels rumble through the city’s heart,

In this dark, chaotic art.

The figure five, a radiant sight,

On firetruck’s frame, gleaming bright,

With tension’s grip, it swiftly sped,

Through shadows where it was led.

Sirens wailed as it roared on,

In rhythmic harmony, its song,

Rainfall danced in its fervent wake,

A symphony no night could break.

Clanging, ringing, crashing noise,

The city’s heartbeat, full of poise,

Wheels rumbling, thunder’s applause,

In the dark, where night withdraws.

Oh, the clangs, the gong’s resound,

Sirens wail with piercing sound,

As wheels rumble through the city’s heart,

In this dark, chaotic art.

Amid the rain and dazzling lights,

A tale of courage in the night,

The figure five sailed on with pride,

In this ode to a wild ride.”

Text 6. T5 Transformer generated Version of The Great Figure, if it were to be written by Dylan Thomas

Interpretation: The poem utilizes and vivid visual and auditory imagery to depict the scene. The rain’s descent, lights shining brightly, and the scarlet hue of the figure five on the firetruck create a visually striking picture. The use of words such as “raced,” “fearless,” “swift,” and “gleaming bright” further emphasizes the speed, excitement, and radiance of the firetruck. The auditory imagery of clanging, gong resounds, sirens wailing, and wheels rumbling adds a sense of chaos, urgency, and movement to the scene. The poem successfully engages multiple senses, immersing the reader in the dynamic atmosphere.

The poem follows a rhythmic structure, utilizing AABBCCDD rhyme scheme in the first and third stanza, and AABB in the rest. This structure, combined with the refrain of phrases such as “Oh, the clangs, the gong’s resound” and “Wheels rumbling through the city’s heart,” creates a sense of musicality and echoes the sounds of the city. The repetition also reinforces the theme of chaos and emphasizes the poem’s sonic qualities.

It explores the themes of motion and chaos within an urban environment. The figure five on the firetruck symbolizes the energy, speed, and bravery associated with emergency response. It becomes a radiant sight, swiftly speeding through the city streets, unheeded by the passersby. The sirens, gongs, and clanging noises serve as a cacophonous backdrop, reflecting the city’s heartbeat and the chaotic nature of urban life. Through its depiction of motion and chaos, the poem captures the essence of a city in action and celebrates the excitement and courage found within it.

The figure five and the firetruck symbolize not only the physical presence of emergency services but also the courage and determination in the face of danger. The poem uses rain and dazzling lights as symbols of the urban environment, emphasizing the contrast between the natural elements and the man-made chaos. The rain becomes a dance partner, highlighting the firetruck’s fervent wake and creating a symphony of sights and sounds that cannot be broken by the darkness of the night. These symbols and images contribute to the overall impression of movement, bravery, and the power of the city.

This lyrical poem was able to understand the style of Dylan Thomas and his use of rhythm and sounds, thereby meeting its objective.

4.4 Question Answering

Symbolism. To find whether it was able to understand the use of symbolism, or if it just interprets poems literally. The model was test given The Snow Man by Wallace Stevens and asked to list all the symbolisms from an unseen poem. The following is the prompt that it was given:

Prompt: Symbolism is a literary technique where objects, characters, or events represent deeper abstract meanings, allowing writers to convey complex ideas indirectly. Tell all instances of symbolism in the following poem:

“One must have a mind of winter

To regard the frost and the boughs

Of the pine-trees crusted with snow;

And have been cold a long time

To behold the junipers shagged with ice,

The spruces rough in the distant glitter

Of the January sun; and not to think

Of any misery in the sound of the wind,

In the sound of a few leaves,

Which is the sound of the land

Full of the same wind

That is blowing in the same bare place

For the listener, who listens in the snow,

And, nothing himself, beholds

Nothing that is not there and the nothing that is.”

Response: “Winter symbolizes a state of detachment and objectivity. Having a “mind of winter” suggests the ability to perceive the world without emotional bias or subjective interpretation. Snow and ice symbolize purity, stillness, and the absence of human presence. The speaker observes the frost, boughs, junipers, and spruces covered in snow and ice, emphasizing the starkness of the natural world. Wind: The wind symbolizes the vast and constant movement of existence. It represents the universal force that permeates everything, unifying all things and blurring boundaries. The land, covered in snow, represents the bare and unadorned reality. It is a symbol of the world stripped of human constructs and interpretations. The snow man represents the ideal observer, detached from personal desires and emotions. The snow man exists in a state of pure perception, beholding the world as it truly is, without projecting human meaning onto it.”

Text 7. Prompt and T5 Transformer’s response for symbolism inference

Thereby it is claimed that based on the above response the T5 transformer was able to learn the true meanings of the symbolism and didn’t interpret them literally.

Irony. Moreover to see whether it remembers all the poems, and if it interprets ironies correctly it was asked the following:

  • Prompt: “Tell me about the irony of in The Raven by Edgar Allan Poe”Footnote 2

  • Response: This poem employs dramatic irony as the narrator continuously seeks answers from the raven, a symbolic representation of death, while being aware that the raven’s repeated response will always be “Nevermore.”

Text 8. Prompt and T5 transformer’s response to find irony

It can be said that the T5 Transformer indeed remembers some if not all the poems it was trained on since it wasn’t given the poem here, and it did understand what an irony is based on this example.

Allusion. Allusion is a literary device that involves making indirect or passing references to people, events, places, or works of art. It relies on the reader or audience’s prior knowledge or familiarity with the referenced material in order to enhance the understanding or add layers of meaning to the current text or speech. Allusions can be historical, mythological, literary, religious, or cultural in nature, and they serve to enrich the overall experience by connecting the present context with well-known or significant elements from the past. By employing allusion, writers and speakers can convey complex ideas, evoke specific emotions, create associations, or establish thematic resonance within their works. To test if this model is able to understand allusion it was given the poem, “Custard the Dragon” by Ogden Nash.

  • Prompt: “Why is Custard reffered to as Percival, in the following poem: {Custard The Dragon}”

  • Response: “Custard is referred to as Percival as a way to mock his supposed cowardice. The name “Percival” is associated with the legendary knight Sir Percival, who is known for his bravery and chivalry in Arthurian legends. By ironically giving the timid and fearful dragon a heroic and valiant name like Percival, the poem emphasizes the contrast between Custard’s reputation and his actual nature. It adds humor to the poem by highlighting the absurdity of the situation and playing with the reader’s expectations.”

Text 9. Prompt and T5 transformer’s response for allusion inference

Overall, based on the question answering it is found that this model as able to learn symbolism, irony and allusion present in a poem, hence it is not just memorizing or literally interpreting but rather it understands poetry and is able to infer the underlying meaning of the stanzas, and the phrases used.

5 Discussion

5.1 Insights

For evaluation this papers tested the results on adversarial situations, for examples with poems and poets which are antithesis of each other. For example transferring a patriotic poem to an anti war pacifist poem focusing on universal brotherhood (Sect. 4.1). Overall this model meets it’s objective, coverting joyful poem to a dark poem (Sect. 4.2), and changing minimalistic poem to a lyrical one (Sect. 4.3). Apart from that the question answering shows that the model did understand the inherent nature of poetry and poetic devices. The interpretations shows that it was able to capture the various variations of ideologies, thematic elements, poetic meter, symbolism, ironies and other poetic devices used. Text 2, is able to represent the anti-war sentiment of Oven and the lyrical symbolism used by him. Exploring the repercussions of war and advocating for peace. For thematic elements Text 4, shows the typical characteristics of Edgar Allan Poe’s works with dark macabre themes, and his exploration of melancholy and being directionless and wandering completely lost. Which can also be observed in one of his famous poems The Raven. Similar to how Thomas Dylan used iambic poetic meter, the T5 transformer successfully projected the iambic poetic meter in Text 6.

Further similar to style transfer in text [4], this paper also found that a sequence to sequence approach was able to capture maximum semantic meaning and poetic integrity for this case. Also as mentioned in the methodology, the results also suggest that not using stop word and punctuation removal, and word stemming was fruitful, since generated poems have a generously leverages punctuation and enjambment. Further since rhyme schemes can be found in the generated poems it can be claimed that this was because word stemming and stop word removal were not done, since otherwise such patterns would not have existed. Another trend which can be noticed is that even though the model has memorized certain poem it is not interpreting them literally and understands the underlying meanings, as demonstrated in question answering.

5.2 Limitations

The following are the potential and identified limitations of this style transformation approach:

  1. 1.

    Subjective evaluation: Assessing the quality of transformed poems is subjective and relies on human perception. This poses a challenge in establishing a definitive metric for objectively measuring the success of the style transformation. Evaluating the poetic merit and fidelity to the given style becomes a subjective judgment.

  2. 2.

    Dependence on poet-specific corpus: The performance of the style transformation heavily relies on the availability and quality of the poet-specific corpus used for fine-tuning the T5 Transformer model [1]. The corpus should adequately represent the target poet’s style to achieve accurate and desirable transformations. Insufficient or low-quality training data can limit the model’s ability to capture the poet’s unique style effectively.

  3. 3.

    Handling rare or uncommon poetic styles: The style transformation model may face difficulties in handling rare or uncommon poetic styles due to the limited availability of training data for such styles.

  4. 4.

    Capturing contemporary or evolving styles: Poetic styles evolve over time, reflecting societal changes and cultural shifts. However, the trained model may not capture evolving styles accurately if the training corpus predominantly consists of older poems lacking representation of recent artistic trends.

5.3 Recommendations

  1. 1.

    Supervised Learning: Whilst making this model we could not find any dataset a tabular form of style transformation. Since is algorithm was able to use an unsupervised method successfully. This algorithm could be used to generate a dataset for this, and then used for supervised style-transformation.

  2. 2.

    Testing on Future LLM(s): This approach can be directly transferred onto any large language model which shows up in the future, and it would be interesting to see the contrasts and similarities of this methods compared to any LLM which is developed in the future.

  3. 3.

    Evaluation for Style Transformation: Establishing more objective evaluation metrics for assessing the quality and fidelity of style transformation in generated poems could enhance the overall assessment process. Research efforts can be directed towards developing computational metrics that capture specific aspects of style, such as rhyme scheme, meter, or thematic coherence. Also human-in-the-loop evaluation process could be done—that was out of the scope of this paper. For qualitative as well as quantitative evaluation.

6 Conclusion

T5 transformer effective capture ideologies, tone, mood, thematic elements, sounds, rhythms employed by author. Advanced language modeling capabilities, the style transfer method enable emulation unique style poets. Training corpus poems prompt incorporate desired author’s style, model generate new embody essence that particular poet. Process exploration creative possibilities generation diverse poetic expressions style chosen author. Success capturing aspects author’s style open avenues poetry generation artistic expression. Provide poets, writers, enthusiasts powerful tool delve nuances poetic styles, creating unique compositions maintaining essence particular author’s voice.