Shaer: Controlled Arabic Poetry Generation with Meter Subform and Semantic Conditioning

Ahmad Abbas, Tamara Fakih, Nour Fakih, Ammar Mohanna


Abstract
Classical Arabic poetry generation requires simultaneously satisfying semantic, linguistic, and fine-grained prosodic constraints. Existing systems typically control broad poetic attributes but do not jointly model semantic intent, meter subform, and poem length. We present Shaer, a controllable Classical Arabic poetry generation framework jointly conditioned on natural-language descriptions, meter subforms, and target hemistich counts. To support this task, we construct an enriched corpus of 116,032 classical Arabic poems derived from Ashaar, containing normalized meter-subform labels and automatically generated, validated semantic descriptions. We then adapt Yehia-7B using QLoRA-based supervised fine-tuning with a completion-only objective. Our evaluation combines automatic assessment of base-meter conformity, requested-subform adherence, and length control with three LLM judges, blinded human evaluation, and memorization analysis. Shaer achieves 95.17% base-meter accuracy, 91.75% poem-level meter-subform accuracy, and 83.40% exact count accuracy. Relative to its untuned foundation model, these results represent gains of 68.68, 57.77, and 38.93 percentage points, respectively; Shaer also attains the highest base-meter accuracy among all evaluated systems. Multi-LLM evaluation and a blinded human assessment of top-ranked outputs further indicate competitive semantic and literary quality. Finally, analysis of all 3,481 test generations finds no exact copies from the training corpus or paired source poems. Code, models, and datasets are publicly available.
Anthology ID:
2026.arabicnlp-main.14
Volume:
Proceedings of The Fourth Arabic Natural Language Processing Conference
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Muhammad Abdul-Mageed, Tamer Elsayed, Houda Bouamor, Samhaa El-Beltagy, Hend Al-Khalifa, Ahmed Abdelali, AbdelRahim Elmadany, Abdellah El Mekki, Kareem Darwish, Sakhar Alkhereyf, Hamzah Luqman, Salam Khalifa, Samar Magdy, Zaid Alyafeai, Injy Hamed, Wajdi Zaghouani, Imed Zitouni
Venue:
ArabicNLP
SIG:
SIGARAB
Publisher:
Association for Computational Linguistics
Note:
Pages:
179–199
Language:
URL:
https://aclanthology.org/2026.arabicnlp-main.14/
DOI:
Bibkey:
Cite (ACL):
Ahmad Abbas, Tamara Fakih, Nour Fakih, and Ammar Mohanna. 2026. Shaer: Controlled Arabic Poetry Generation with Meter Subform and Semantic Conditioning. In Proceedings of The Fourth Arabic Natural Language Processing Conference, pages 179–199, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Shaer: Controlled Arabic Poetry Generation with Meter Subform and Semantic Conditioning (Abbas et al., ArabicNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.arabicnlp-main.14.pdf