Metrical Tagging in the Wild: Building and Annotating Poetry Corpora with Rhythmic Features (2021)

Abstract: A prerequisite for the computational study of literature is the availability of properly digitized texts, ideally with reliable meta-data and ground-truth annotation. Poetry corpora do exist for a number of languages, but larger collections lack consistency and are encoded in various standards, while annotated corpora are typically constrained to a particular genre and/or were designed for the analysis of certain linguistic features (like rhyme). In this work, we provide large poetry corpora for English and German, and annotate prosodic features in smaller corpora to train corpus driven neural models that enable robust large scale analysis. We show that BiLSTM-CRF models with syllable embeddings outperform a CRF baseline and different BERT-based approaches. In a multi-task setup, particular beneficial task relations illustrate the inter-dependence of poetic features. A model learns foot boundaries better when jointly predicting syllable stress, aesthetic emotions and verse measures benefit from each other, and we find that caesuras are quite dependent on syntax and also integral to shaping the overall measure of the line.

## introduction metrical verse, lyric as well as epic, was already common in preliterate cultures @xcite , and to this day the majority of poetry across the world is drafted in verse @xcite . in order to reconstruct such oral traditions, literary scholars mainly study textual resources (rather than audio). the rhythmical analysis of poetic verse is still widely carried out by exampleand theory-driven manual annotation of experts, through so-called close reading @xcite @xcite . fortunately, well-defined constraints and the regularity of metrically bound language aid the prosodic interpretation of poetry. however, for projects that work with larger text corpora, close reading and extensive manual annotation are neither practical nor affordable. while the speech processing community explores end-to-end methods to detect and control the overall personal and emotional aspects of speech, including fine-grained features like pitch, tone, speech rate, cadence, and accent @xcite , applied linguists and digital humanists still rely on rule-based tools @xcite @xcite , some with limited generality @xcite , or without proper evaluation @xcite . other approaches to computational prosody make use of lexical resources with stress annotation, such as the cmu dictionary @xcite , are based on words in prose rather than syllables in poetry @xcite , are in need of an aligned audio signal @xcite , or only model narrow domains such as iambic pentameter @xcite @xcite or middle high german @xcite . to overcome the limitations of these approaches, we propose corpus driven neural models that model the prosodic features of syllables, and to evaluate against rhythmically diverse data, not only on syllable level, but also on line level. additionally, even though practically every culture has a rich heritage of poetic writing, large comprehensive collections of poetry are rare. we present in this work datasets of annotated verse for a varied sample of around 7000 lines for german and english. moreover, we collect and automatically annotate large poetry corpora for both languages to advance computational work on literature and rhythm. this may include the analysis and generation of poetry, but also more general work on prosody, or even speech synthesis. our main contributions are: ## manual annotation we annotate prosodic features in two small poetry corpora that were previously collected and annotated for aesthetic emotions by @xcite . both corpora cover a time period from around 1600 to 1930 ce, thus encompassing public domain literature from the modern period. the english corpus contains 64 poems with 1212 lines. the german corpus, after removing poems that do not permit a metrical analysis, contains 153 poems with 3489 lines in total. both corpora are annotated with some metadata such as the title of a poem and the name and dates of birth and death of its author. the german corpus further contains annotation on the year of publication and literary periods. figure 1 illustrates our annotation layers with three fairly common ways in which poetic lines can be arranged in modern english. a poetic line is also typically called verse, from lat. versus, originally meaning to turn a plow at the ends of successive furrows, which, by analogy, suggests lines of writing @xcite . in this work, we manually annotate the sequence of syllables for metrical (meter, met) prominence (+/-), including a grouping of recurring metrical patterns, i.e., foot boundaries (|). we also operationalize a more natural speech rhythm (rhy) by annotating pauses in speech, caesuras (:), that segment the verse into rhythmic groups, and in these groups we assign main accents (2), side accents (1) and null accents (0). in addition, we develop a set of regular expressions that derive the verse measure (msr) of a line from its raw metrical annotation. in english or german, the rhythm of a linguistic utterance is basically determined by the sequence of syllable-related accent values (associated with pitch, duration and volume/loudness values) resulting from the 'natural' pronunciation of a line, sentence or text by a competent speaker who takes into account the learned inherent word accents as well as syntax-and discourse-driven accents. thus, lexical material comes with n-ary degrees of stress, depending on morphological, syntactic, and information structural context. the prominence (or stress) of a syllable is thereby dependent on other syllables in its vicinity, such that a syllable is pronounced relatively louder, higher pitched, or longer than its adjacent syllable. ## large poetry corpora in order to enable large scale experiments on poetry, we collect and standardize large poetry corpora for english and german. the english corpus contains around 3 million lines, while the german corpus contains around 2 million lines. the corpora and code can be found at https://github.com/ tnhaider/metrical-tagging-in-the-wild 1 alexandrine: -+-+-+-+-+-+-? the symbol before ? is optional 2 hexameter: +--?+--?+--?+--?+--+-our resources are designed in a standardized format to sustainably and interoperably archive poetry in both .json and tei p5 xml. the .json format is intended for ease of use and speed of processing while retaining some expressiveness. our xml format is built on top of a "base format", the socalled dta-basisformat foot_0 @xcite that not only constrains the data to tei p5 guidelines, but also regarding a stricter relaxng schema that we modified for our annotation. foot_1 we built a large, comprehensive, and easily searchable resource of new high german poetry by collecting and parsing the bulk of digitized corpora that contain public domain german literature. this includes the german text archive (dta) ( http: //deutschestextarchiv.de ) the digital library of textgrid ( http://textgrid.de ), and also the german version of project gutenberg (which we omit from our experiments due to inconsistency). 5 each of these text collections is encoded with different conventions and varying degrees of consistency. textgrid contains 51,264 poems with the genre label 'verse', while dta contains 23,877 poems with the genre label 'lyrik'. it should be noted that the whole dta corpus contains in total 40,077 line groups that look like poems, but without the proper genre label, poems are likely em-bedded within other texts and might not come with proper meta-data. we implement xml parsers in python to extract each poem with its metadata and fix stanza and line boundaries. the metadata includes the author name, the title of the text, the year it was published, the title and genre of the volume it was published in, and finally, an identifier to retrieve the original source. we perform a cleaning procedure that removes extant xml information, obvious ocr mistakes, and normalize umlauts and special characters in various encodings, foot_3 particularly in dta. we use langdetect foot_4 1.0.8 to tag every poem with its language to filter out any poems that are not german (such as latin or french). the corpus finally almost 2m lines in over 60k poems. in figure 3 we plotted each poem in dta and textgrid over time, from 1600 to 1950. the x-axis shows the year of a poem, while the y-axis is populated by authors. one can see that dta consists of full books that are organized by author (large dots) so that the datapoints for single poems get plotted on top of each other, while textgrid has a time stamp for most single poems (after 1750), outlining the productive periods of authors. ## experiments in the following, we carry out experiments to learn the previously annotated features and determine their degree of informativeness for each other with a multi-task setup. we include two additional datasets with english meter annotation, and evaluate pre-processing models for syllabification and part-of-speech tagging. ## conclusion we created large poetry corpora for english and german to support computational literary studies and annotated prosodic features in smaller corpora. our evaluation shows that a multitude of features can be annotated through silent reading, including meter, main accents and caesuras, even though foot annotation can be challenging. finally, we performed first experiments with a multi-task setup to find beneficial relations between certain prosodic tasks. learning metrical annotation, including feet and caesuras, largely benefits from a global verse measure label, while foot boundaries also benefit from any joint learning with syllable stress and all features alltogether, even surpassing the human upper bound.