A Hybrid Framework for Automated Recognition of Rhetorical Devices in Poetry Using Pattern Recognition and NLP Techniques
Yuan Fang · 2025
The automatic recognition of rhetorical devices in poetry involves advanced computational techniques, including pattern recognition, natural language processing (NLP), and attention-based deep learning models. Rhetorical devices, such as metaphors, alliteration, and parallelism, are integral to poetic expression, yet their detection poses challenges due to their implicit and context-dependent nature. This study introduces a hybrid framework that combines rulebased heuristics with transformer-based semantic modeling to achieve precise and interpretable recognition of rhetorical patterns. Linguistic and structural features, such as phoneme repetition and syntactic alignment, are extracted through pattern recognition, while transformers generate contextualized embeddings to capture implicit semantic relationships. The rule-based system ensures domain-specific precision, addressing explicit patterns, while the transformer module enables adaptability to complex poetic structures. Evaluated on a curated dataset of $\mathbf{5, 0 0 0}$ annotated poetic lines, the hybrid model achieves an accuracy of $89.5 \%$ and an F1score of $88.9 \%$, significantly exceeding the performance of rulebased systems and standalone deep learning models. These results highlight the model’s ability to integrate explicit and implicit feature analysis, advancing the computational study of rhetorical devices in poetry and providing a scalable, interpretable framework for literary analysis.