Daejeon, July 27–31
Animal metaphors are a central but conceptually elusive feature of literary language, often used to characterize humans, encode social dynamics, or signal moral and cultural values. An example is “Another step, you beast, and husband or no husband, I’ll kill you!” which situates social power relations in animal imagery. Despite their interpretive importance, animal metaphors are difficult to define and identify systematically across large text collections. This paper explores their detection using methods from Natural Language Processing (NLP). For code and data of the project, see, https://github.com/gi47huwi/AniMe.
Metaphors are widely recognized as complex, context-sensitive, and theoretically contested phenomena, with extensive study in linguistics (Semino 2008; Pragglejaz 2007; Fauconnier and Turner 2003; Goatly 1997; Lakoff and Johnson 1980), philosophy (Sontag 1989; Ricœur 1993; Davidson 1978; Blumenberg 1960), and literary scholarship (Wellek 1949; Jakobson 1956). Computational research has developed methods to detect metaphors more broadly, focusing on figurative language at scale (Ptiček and Dobša 2023; Tsvetkov et al. 2013; Stefanowitsch and Gries 2006), but quantitative studies specifically on animal metaphors are rare. Examples in Cultural Analytics include analyses of animacy (Häußler et al. 2024; Karsdorp et al. 2015) or anthropomorphization (Hara and Koda 2020).
Even when metaphor is not the main focus of a study, its pervasive nature makes it relevant across different areas. For instance, in their study of biodiversity in creative literature, Langer et al. (2021) extract terms referring to animals using a dictionary matching approach. Piper (2022) replicated their study, using a supervised machine learning approach (Book NLP’s supersense tags), to identify occurrences of words referring to animals and other biological entities. These approaches provide insights into animal reference distribution but do not distinguish literal from figurative use. Studies specifically targeting animal metaphors remain limited. The closest precedent for combining manual annotation with quantitative metaphor analysis in literary texts is Caracciolo et al. (2019), who systematically code human–nonhuman metaphors, including animal imagery, across three novels. While Caracciolo et al. (2019) demonstrate a close-reading approach, we make a proposal for coding animal metaphors using a transformer-based classifier that will allow us to cover a corpus of over 4,000 works.
In our study, we focus on animal metaphors, human-related or not, and explore their automatic detection by training a classifier on a large, diverse set of texts to identify them at scale. We treat animal metaphor detection as a binary task and adopt a broad working definition: an ‘animal’ term is metaphorical if it creates a contrast between its literal meaning and its contextual meaning (Pragglejaz 2007). Additionally, we work at the sentence level, in contrast to more common token-level approaches to general metaphor detection (Tong et al. 2021). Similes are treated as a subset of metaphorical expressions due to their role in conveying meaning beyond the literal. Our definition does not distinguish between novel and conventional or ‘dead’ metaphors. While this distinction is beyond the scope of the present study, it remains an important direction for future work.
Our corpus consists of 4,246 works of English prose fiction spanning the years 1780 to 1930 and covering twelve genres, retrieved from Project Gutenberg using metadata provided by the Gender Novel Corpus (Tagliaferri et al. 2019). It includes a broad range of narrative subgenres (speculative fiction, crime fiction, fairy tales, and realist novels among them), making it well-suited for studying how animal metaphor use varies across generic and historical contexts. Our corpus matches the Gender Novel Corpus in terms of text selection; the metadata provided by Tagliaferri et al. (2019) was used to identify and retrieve the texts from Project Gutenberg.
We applied BookNLP (Bamman et al., 2014) to the corpus, using its supersense tagger to identify nouns tagged as noun.animal in the WordNet supersense taxonomy as candidate animal terms. From these, we randomly sampled a candidate set of 5,500 sentences for annotation, preserving genre and temporal variation across the sample.
The first and second authors independently annotated a random subset of 500 sentences drawn from the candidate set to establish inter-annotator agreement. A sentence was coded as “metaphor” if it contained an animal metaphor according to our working definition, and as “no metaphor” if it did not. For each candidate sentence, a preceding and following sentence were shown to provide context (see Figure 1, where the term pet has been tagged as noun.animal).
Figure 1. Label Studio’s interface for annotation.
While many metaphorical mentions were straightforward to annotate, a subset of cases constituted recurring “edge cases”, where literal and figurative readings overlap. In practice, the contrast between literal and non-literal use typically entails that animal qualities are attributed to a human referent or abstract entity; edge cases tend to be those where this transfer is absent or unclear. These edge cases fall into four types.
The first type involves passages where literal animals are embedded in figurative frames, e.g., an elephant trampling a cabin “like an ant-hill”. Here, the noun elephant is used in its literal meaning and the simile conveys scale and does not attribute animal qualities to humans.
The second type involves similes that do not attribute animal qualities to a human referent but contribute to the characterisation of a wider context:
“Now, out here in this desolate place … the very frogs tired of their chanting … these two far, deep-toned syllables seemed like a human voice.”
The frogs are physically present in the scene and it is the sound, not a human referent, that is being characterized via the animal. Such cases are nonetheless prone to misclassification, as the simile structure and animal term together closely resemble the surface form of a true animal metaphor.
The third type involves metaphors that target collective or non-human entities rather than individual humans (e.g., “The middle class is a wobbly little lamb between a lion and a tiger”), where the target falls outside the core case of individual human referents, introducing uncertainty about whether the annotation criteria apply.
The fourth type involves syntactically marked constructions such as enumerations, which introduce a further kind of ambiguity. In “A wild animal, a man, a snake, might be in hiding,” the parallel listing of a human alongside animals invites the inference that the man shares their qualities, without making that mapping explicit. Unlike a simile or direct predication, the figurative meaning is implied through syntactic parallelism alone, making it difficult to classify under a definition that requires a recoverable contrast between literal and contextual meaning.
Inter-annotator agreement was high in terms of percentage agreement (≈89%), though Krippendorff’s α was 0.58 once chance agreement was taken into account. The comparatively lower α largely reflects the strong imbalance between metaphorical and non-metaphorical instances, as well as the interpretive nature of metaphor identification, particularly in borderline cases like those described above. Agreement measures of this range align with comparative studies on general metaphor detection in computational linguistics. See, for instance, Shutova (2017), where agreement between two annotators on identifying linguistic metaphors reached κ = 0.62, or Maudslay et al. (2024), who report κ = 0.51 for metaphor identification.
Following consensus discussions to resolve disagreements, the annotators each independently annotated a further portion of the remaining candidate set. The process resulted in a final annotated dataset of 1,823 sentences, of which 361 were tagged as “metaphor” and 1,462 as “no metaphor” (see Figure 2).
Figure 2. Distribution of publication dates across the annotated dataset, by metaphor label.
Given the class imbalance between “no metaphor” and “metaphor” sentences, we randomly sampled the majority class during training to reduce overfitting. A RoBERTa-based binary classification model (“roberta-base”) was fine-tuned with a learning rate of 1e-5 on 70% of the annotated sentences and evaluated on a held-out validation set of 30% over five epochs (see Table 1). Our best model achieved an F1 of 0.72 for metaphor detection, comparable to other NLP studies on computational metaphor processing (see, for instance, Mao et al. 2023; Maudslay et al. 2020; Gao et al. 2018). While these existing quantitative approaches focus on general metaphor detection, directly applying them to our task is not straightforward: they are primarily trained and evaluated on news and academic corpora, and may not generalise well to the distinct linguistic and stylistic properties of literary fiction. We therefore opted for a dedicated classifier trained on literary data.
Table 1. Performance measures of the RoBERTa classification model. Precision, Recall, and F1-score are reported per class (Non-metaphor, Metaphor) as well as macro and weighted averages. Support indicates the number of instances per class in the validation set.
To understand the model’s limitations and inform future improvements, we manually inspected misclassifications. Across the four edge case types discussed above, the classifier performed well, correctly handling the majority of complex and ambiguous cases. The one exception was the enumerative construction (“A wild animal, a man, a snake, might be in hiding”), where the classifier predicted “no metaphor” — though given the implicit nature of the mapping, this is better understood as reflecting the genuine difficulty of the case than as a clear misclassification.
The main source of false positives was simile-like structures without an accompanying animal metaphor, pointing to a limitation in distinguishing formal comparison from metaphorical function. An example from the corpus is “…with no more warning than the sound of a swamp-bird’s flight, was like a nightmare,” where the bird is used literally and the simile maps the thought onto a nightmare rather than attributing animal qualities to a human referent. Future training data should therefore include more non-metaphorical similes to enhance this differentiation, as well as more targeted examples of rare constructions.
This paper demonstrates that animal metaphors can be detected automatically at the sentence level using a relatively small but carefully annotated training set. Despite the small training set and the heterogeneous nature of metaphor occurrences, the classifier performs reasonably well and aligns with existing metaphor detection benchmarks.
Future work should expand training data to better cover rare edge cases and include more non-metaphorical similes. While the classifier has been evaluated on a held-out sample drawn from the full corpus, testing on a larger sample would further assess its robustness across the full genre and temporal range. Once sufficiently robust, the model can be applied to investigate how animal metaphor use varies across genres, time periods, and author demographics — questions that have so far been inaccessible at corpus scale due to the difficulty of distinguishing figurative from literal animal reference. For fields such as animal studies and ecocriticism, which rely heavily on close reading of individual texts, this opens up new possibilities. It becomes possible to trace how cultural attitudes toward the nonhuman world and social values encoded in animal imagery are distributed across the full breadth of a literary tradition.