Аналізування українськомовних віршів засобами обробки природної мови

Loading...
Thumbnail Image
Date
2025
Authors
Смиш, Олег
Швець, Дмитро
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
У статті описано розроблення та застосування парсера для комплексного аналізування українськомовних віршів. Створено механізми визначення віршового розміру, рим і способів римування, що ґрунтуються на побудові схем наголошування. Парсер дає змогу виявляти входження 16 художніх засобів на трьох рівнях оброблення тексту. На фонологічному рівні застосовано rule-based підходи в аналізуванні тексту, на морфосинтаксичному — оброблення даних формату CoNLL-U, сформованих із результатів роботи трьох мовних аналізаторів, а для виявлення тропів на семантичному рівні — використано велику мовну модель. Створено вебзастосунок для наочної взаємодії з функціями парсера. Розроблений інструмент застосовано для аналізування трьох українськомовних збірок віршів.
Description
This paper presents the development and usage of a parser designed for the comprehensive analysis of Ukrainian-language poetry. The parser integrates techniques from natural language processing to determine metrical patterns, identify rhymes and rhyme schemes, and detect the presence of 16 tropes across three levels of linguistic processing: phonological, morphosyntactic, and semantic. At the phonological level, ruleased methods are employed to detect stylistic devices such as alliteration, assonance, anaphora, epiphora, refrain, and rhetorical questions. For morphosyntactic analysis, the parser processes CoNLL-U formatted data generated by three language analysers (UDPipe, Stanza, spaCy) to ensure robustness in identifying epithets, inversions, parallelisms, similes, and rhetorical appeals. Semanticlevel analysis is conducted using a large language model (LLM), Claude 3.5 Sonnet, which interprets metaphors, hyperbole, litotes, personification, and oxymora. The parser includes a metrical analysis module that identifies stressed syllables and constructs rhythmic patterns to classify each poetic line into one of the canonical meters (iamb, trochee, dactyl, amphibrach, or anapest). It also identifies rhyme pairs and classifies rhyme schemes as tail, ring, or internal. A web application was developed using FastAPI and React, enabling users to input poems and interactively visualize analytical results. This tool has been applied to three canonical Ukrainian poetry collections — by Taras Shevchenko, Lesia Ukrainka, and Vasyl Symonenko — demonstrating its capacity to uncover stylistic patterns across different periods and poetic styles. Evaluation results show high accuracy: 94.39% for metre detection, 96.26% for rhyme identification, and 94.58% for trope recognition, outperforming three reviewed LLMs. The parser enables nuanced analysis of Ukrainian poetic texts, supporting educational, philological, and literary research.
Keywords
обробка природної мови, парсер, мовний аналізатор, великі мовні моделі, вебзастосунок, українська мова, вірш, аналіз вірша, троп, художній засіб, віршовий розмір, рима, спосіб римування, стаття, natural language processing, parser, language analyser, large language models, web application, Ukrainian language, poem, poem analysis, trope, metre, rhyme, rhyme scheme
Citation
111
Collections