KU Leuven
Automatically generating rhythmic poems is a multifaceted task that necessitates a computational system capable of not only constructing grammatically correct verses but also adhering to literary restrictions, such as poetic meter. The process of integrating meter into the generation of poems is particularly challenging, as the stress patterns of selected words must align with their grammatical and semantic appropriateness within the context of the poem. The addition of rhyme constraints further complicates the selection process. While Large Language Models (LLMs) have revolutionized the field of natural language processing (NLP) and facilitated the creation of poetry, adequately integrating meter and rhyme continues to pose challenges for LLMs due to their inability to account for the various constraints mentioned above.
In this talk, we investigate the incorporation of poetic meter into automatically generated poetry. We compare the method of integrating meter via prompting LLMs to a constraint-based approach, which adjusts the output probability distribution of a language model to ensure adherence to the meter. The constraint-based approach is implemented within open source LLMs. Our findings suggest that the constraint-based approach has the potential to improve the rhythmic quality of generated poetry.