E du P o: Progress and Challenges of Automated Analysis and Generation of C zech Poetry (2025)

Abstract: This paper explores automated analysis and generation of Czech poetry. We review existing tools, datasets, and methodologies while considering the unique characteristics of the Czech language and its poetic tradition. Our approach builds upon available resources wherever possible, yet requires the development of additional components to address existing gaps. We present and evaluate preliminary experiments, highlighting key challenges and potential directions for future research.

## introduction and related work in natural language processing (nlp), there is a small but permanent interest in dealing with poetry, as its unique features make it rather different from most other texts and thus more challenging in some aspects than other genres (gonçalo oliveira, 2017). in particular, the strong importance of formal properties, intertwined with semantic content of the text, makes it impossible to simply apply standard domain adaptation techniques to fit generaldomain systems to poetry; instead, poetry-specific approaches need to be used. even in the times where large language models (llms) are gradually becoming the solution to most nlp tasks, often with no or little training required, the situation with poetry is different: while standard off-the-shelf llms can be used to analyze some properties of poems (typically semantic ones) as well as to possibly generate poetry of reasonable quality in english and a few other major languages, usefulness of vanilla llms for poetry in many languages is poor (shao et al., 2021; hämäläinen et al., 2022; sawicki et al., 2023; porter and machery, 2024). we believe this is due to the focus of the llms on meaning rather than form, as exemplified by their low performance at even simple formbased tasks, such as counting characters in words (xu and ma, 2025). this is at least partially due to inadequate tokenization, as the poetry-relevant units (such as syllables) do not correspond well to the llm subwords (wöckener et al., 2021), encouraging the use of syllable-based tokenization (oncevay and rojas, 2020) or tokenization-free approaches (belouadi and eger, 2023). the latter work also reveals another shortcoming of standard llms, which is the fact that many poetry-relevant features of the text, such as stress, are not directly apparent to the llm, and performance can thus be greatly improved by revealing such features via automatically generated annotations of the data. in our work, we focus on automated generation of czech poetry, with poetry analysis as an indispensable component for automated data annotation and evaluation. while there is a range of attempts at generating poetry in several major languages (piorecký and husárová, 2024, chapter 5), we are not aware of any substantial work on generating czech poetry since neverilová and pala (2015) and materna (2016). we thus mostly base our approach on works focusing on other languages, and adapt and extend these approaches for the specifics of the czech setting. on the other hand, there has been extensive work on automated analysis of czech poetry, centered around the květa tool by plecháč (2016). @xcite we thus use květa as the basis for our analyses, identifying and rectifying some of its shortcomings as well as implementing several missing components. we also take inspiration from the alternative approach to metre detection by klesnilová et al. (2024). there has also been some work on automatically identifying themes and motives present in czech poetry (bendík, 2023; kořínková et al., 2024); however, the reported results were mostly negative, concluding that the chosen methods for theme and motive identification do not yield satisfactory results. we thus attempt to solve the problem by using different methods. regarding the theory of czech verse and czech poetry, we mainly base our approach on the works of ibrahim et al. (2013) and plecháč and kolár (2017), which had also been the basis for květa and for the k čv poetry corpus which we use. automated evaluation of the quality of generated texts is a long-standing problem which still lacks complete and satisfactory solutions (schmidtová et al., 2024). in generated poetry, we are interested in some rather standard qualities of text, such as correct grammatical structures and meaningfulness, but already these standard qualities are complicated by the fact that various language constructions, unacceptable in standard writing, can be allowed or even encouraged in poetry (e.g. non-standard word order or creatively deriving new words). besides that, we would ideally also like to assess some other literary values, such as creativity, beauty, etc., where even human agreement is low; although some automated approaches are appearing, such as the recent work on evaluating novelty of texts by lu et al. (2025). on the other hand, many of the formal properties of poetry (such as metre or rhyming) are quite rigidly defined and thus rather easy to evaluate automatically (although we need to keep in mind that human authors typically do not follow the rules perfectly). we discuss specifics of the czech language and czech poetry in section 2, we present our approaches to analyzing czech poetry in section 3, and we describe and evaluate our experiments in poetry generation in section 4. as this paper presents ongoing work, we also discuss a range of plans for future work throughout the paper. all our source codes and models are publicly available under permissive licences. @xcite a live betaversion demo of our tools is also available online; foot_3 screenshots are attached in appendix g. some of our experiments have already been described in (chudoba and rosa, 2024). the main practical motivation for our work, within a broader project titled edupo, foot_4 is to develop an interactive educational application to be used in teaching about poetry in czech schools; however, we do not discuss this axis of our work in more detail here, as we find this out of scope for the target reader, and we thus focus solely on the nlp aspects of our work in this paper. ## specifics of the czech setting in this section, we discuss several specifics of dealing with czech poetry. ## automated analysis of poetry we have built a poetry analysis framework that takes a plaintext poem as input (one verse per line, empty lines separating stanzas), performs a sequence of automated analyzes, and produces annotations of the poem text in json format. the annotations include phonetic transcriptions, syllabic features, morphological and syntactic features, versological annotation of reduplicants, rhymes, stresses, and metres, motives of the poem, and stylometric analysis. in future, we also plan to try identifying some poetic forms (such as a sonnet or a limerick), some figures of speech (some schemes, such as alliterations or anaphoras, and possibly also some tropes, such as metaphors), and probably also some euphonic qualities. the framework is built on top of květa (plecháč, 2016) as its backbone, with many improvements and complements as needed, and uses udpipe (straka and straková, 2017) to provide morphological and syntactic analyses. for simplicity, most of the analyses are largely context-independent, which is sufficient in typical cases, but fails to fully correctly cover all situations. often, multiple ways to analyze the same part of the poem are theoretically possible, and the context of the neighbouring phones, words, verses, or of the whole poem, should be taken into account to correctly select the most adequate variant of the analysis within the given context. @xcite for future work, we envision a solution that would keep some analyses ambiguous at certain stages of the processing and disambiguate them through post-processing. while the analyses may also be useful on their own, we use them to automatically annotate training data and to define evaluation measures. ## automated generation of poetry our generation approach consists of enriching the plain texts of the poems with relevant annotations and fine-tuning a llm on the dataset. at inference, desired parameters of the poem to be generated are transformed into a prompt structured in the same way as the annotations in the training data. so far, we have performed two sets of exploratory experiments in poetry generation (referred to as first set and second set), experimenting with base model choice, data formatting, and tokenization. the best performing model in each of these sets is further referred to as first model and second model, respectively. the first model is released on huggingface as jinymusim/gpt-czech-poet, foot_26 together with other models from the first set of experiments which use different tokenizations. @xcite the second model is released on huggingface as tomasmcz/edupo_v0.5. @xcite examples of generated poems are attached in the appendix e. ## conclusion in this paper, we presented our ongoing effort of devising a comprehensive framework for automated analysis and generation of czech poetry. our approach is largely based on existing tools and datasets and on methods described for other languages, but still faces numerous issues, pertaining to various imperfections and omissions of the available tools and datasets, as well as to specific properties of czech language and czech poetry. we described a range of improvements to existing tools as well as newly designed and implemented components. we also performed various evaluations, shedding light on the tasks and the performance of the proposed methods, as well as at language generation and czech poetry in general. the current state of our work leaves many open opportunities for future research and improvements, which we discussed throughout the paper.