---
title: "Tahḏīb — paper by Elzohbi and Zhao (2025)"
description: "The authors build a co-creative helper: given a verse with a masked span and a target beat pattern, the… 19 references, cited by 1 paper here."
authors: ["Mohamad Elzohbi", "Richard Zhao"]
year: 2025
venue: "Proceedings of The Third Arabic Natural Language Processing Conference"
source: "https://aclanthology.org/2025.arabicnlp-main.15/"
doi: "10.18653/v1/2025.arabicnlp-main.15"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/elzohbi-2025-tah-ib-rhythm-aware-phrase/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/elzohbi-2025-tah-ib-rhythm-aware-phrase/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/page/15/) / Tahḏīb: A Rhythm-Aware Phrase Insertion for Classical Arabic Poetry Composition

# Tahḏīb: A Rhythm-Aware Phrase Insertion for Classical Arabic Poetry Composition

**Authors:** Mohamad Elzohbi and Richard Zhao · **Year:** 2025 · **Venue:** [Proceedings of The Third Arabic Natural Language Processing Conference](https://md.research.elamur.ai/free/en/venues/arabicnlp/) ([ArabicNLP 2025](https://md.research.elamur.ai/free/en/venues/arabicnlp/2025/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2025.arabicnlp-main.15/) · [PDF](https://aclanthology.org/2025.arabicnlp-main.15.pdf) · [DOI 10.18653/v1/2025.arabicnlp-main.15](https://doi.org/10.18653/v1/2025.arabicnlp-main.15) · [OpenAlex](https://openalex.org/W4416037659)

**Citations:** 0 citations (OpenAlex, 2026-10-14) · [1](https://md.research.elamur.ai/free/en/papers/elzohbi-2025-tah-ib-rhythm-aware-phrase/cited-by/) in our library, of the 149,439 papers whose bibliographies we read

## Summary
Classical Arabic poetry must follow strict ʿArūḍ meters. Each meter is a mora-level pattern of vocalized (1) and unvocalized (0) letters, and finding that pattern requires full diacritics, which most corpora lack. The authors build a co-creative helper: given a verse with a masked span and a target beat pattern, the model proposes words that fill the gap and fit the rhythm. A hand-written grapheme-to-beat (G2B) converter applies traditional prosody rules to fully diacritized text and produces the target patterns. Those rules cover Madda expansion, Išbāʿ, Tanwīn, Tašdīd, silent letters and Hamzat al-Waṣl. ByT5 is then fine-tuned with a conditional denoising objective in a curriculum: first the general diacritized Arabic corpus Tashkeelah, then the poetry corpus APCD. The authors also test starting from their earlier English lyrics model. At inference the input does not need diacritics. Exact rhythm accuracy reaches roughly 73% on Tashkeelah and 81% on APCD, against much lower ByT5-base baselines, with similar mT5-based coherence across models. This shows that byte-level models can enforce explicit prosodic constraints.

## Key points
- **G2B transformation.** Rule-based scansion (al-Kitābah al-ʿArūḍīyyah) reduces every grapheme to one of four diacritic marks, then to 1 or 0. It relies on a dictionary of special words missing long-vowel letters. Code, data and dictionaries are on GitHub (melzohbi/poem-rhythm-arabic).
- **Accuracy after three epochs on Tashkeelah.** Each pair of scores below lists the Tashkeelah evaluation result first and the APCD evaluation result second:
  - ByT5-B-AR scored 72.31% and 78.94% exact rhythm accuracy.
  - ByT5-AR scored 71.86% and 78.37%.
  - ByT5-base scored only 26.31% and 15.17%.
- **Gains from three more APCD epochs.**
  - ByT5-AR and ByT5-B-AR gained about +1 point on Tashkeelah and +2 points on APCD, reaching 73.00/73.06 and 80.43/81.14.
  - ByT5-base jumped +34.48 points on APCD, to 49.65.
- **Metrics.** Besides exact accuracy, the authors report Levenshtein similarity of rhythms (about 95–97 for the fine-tuned models). Coherence is the mT5-base cross-entropy against the model's fill-in. It is similar for all models: about 29 on Tashkeelah and about 20 on APCD, lower being better.
- **Cross-lingual transfer.** Starting from the English beat-pattern model (ByT5-B-AR) gives a better start and faster early convergence, but only a small final gain.

## Interesting ideas
- Turning a formal constraint (meter) into an explicit, deterministic rule-based signature and conditioning the generator on it makes it enforceable and checkable, instead of hoping the model absorbs it from corpus statistics.
- The task is framed as filling a masked span under a target constraint, not as whole-text generation, so a human stays in the loop and edits locally.
- Coherence is scored by asking an independent pretrained masked model (mT5) how likely it finds the inserted tokens in context, which cheaply judges fluency without a human.
- Warm-starting from the same task in another language mainly speeds up early convergence rather than raising the final ceiling, an honest result worth checking before investing in transfer.
- A byte-level model was chosen because the constraint lives at the character/diacritic level, which subword tokenizers obscure.

## For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

- **I1** (back): Generation from the meaning graph could take explicit structural targets (e.g., required argument frame or clause pattern) computed by a deterministic function, and verify outputs by recomputing that function.
- **I2** (back): The text → graph → text compressor could regenerate only the spans whose graph nodes changed, keeping the rest verbatim and making each edit traceable.
- **I3** (learn): A held-out masked-LM scorer could act as one more witness when ranking silver outputs or repair-rule candidates, though the paper's caveat that automatic coherence is weak still applies.
- **I4** (learn): When reusing parsers or teacher tiers across UD dialects or domains, measure both learning curves and final scores so that speed-ups are not mistaken for quality gains.
- **I5** (tokens): For morphology-sensitive decisions (affixes, contractions, hyphenation), character-level features or models avoid tokenizer artifacts and keep each decision explainable at the character level.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [University of Calgary](https://md.research.elamur.ai/free/en/universities/university-of-calgary/) — University, Calgary, Canada · 4 works · 287 citations

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works

🧭 Topics (1): [Semitic languages](https://md.research.elamur.ai/free/en/topics/semitic-languages/) · 2,908 works

## Cite

Cite as: Mohamad Elzohbi and Richard Zhao. 2025. Tahḏīb: A Rhythm-Aware Phrase Insertion for Classical Arabic Poetry Composition. Proceedings of The Third Arabic Natural Language Processing Conference.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{elzohbi2025tahdib,
  title = {{Tahḏīb: A Rhythm-Aware Phrase Insertion for Classical Arabic Poetry Composition}},
  author = {Mohamad Elzohbi and Richard Zhao},
  booktitle = {Proceedings of The Third Arabic Natural Language Processing Conference},
  year = {2025},
  doi = {10.18653/v1/2025.arabicnlp-main.15},
  url = {https://doi.org/10.18653/v1/2025.arabicnlp-main.15}
}
```

- [← previous Tachelhiyt-Darija: a parallel speech corpus for two underrepresented languages](https://md.research.elamur.ai/free/en/papers/atouf-2025-tachelhiyt-darija-parallel-speech-corpus/)
- [next → That Ain't Right: Assessing LLM Performance on QA in African American and West African English Dialects](https://md.research.elamur.ai/free/en/papers/coggins-2025-that-ain-t-right-assessing/)
- [↑ back to papers of 2025](https://md.research.elamur.ai/free/en/papers/2025/page/15/)

## References

19 references, 7 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Petru Soviany, Radu Tudor Ionescu, Paolo Rota, and Nicu Sebe. 2022. Curriculum learning: A survey. International Journal of Computer Vision, 130(6):1526–1565. [↗](https://doi.org/10.1007/s11263-022-01611-x)
2. Omar Abboushi and Mohammad Azzeh. 2023. Toward fluent arabic poem generation based on fine-tuning aragpt2 transformer. Arabian Journal for Science and Engineering, 48(8):10537–10549. [↗](https://doi.org/10.1007/s13369-023-07692-1)
3. Ismail Al-Moqri and Yahya A Al-Mubaraki. 2009. Kitāb al-ʿArūd wa l-Qawāfī. Transcription and Commentary, Dar Al-Nashr Lil-Jami’at. [find](https://scholar.google.com/scholar?q=Ismail+Al%2DMoqri+and+Yahya+A+Al%2DMubaraki%2E+2009%2E+Kit%C4%81b+al%2D%CA%BFAr%C5%ABd+wa+l%2DQaw%C4%81f%C4%AB%2E+Transcription+and+Commentary%2C+Dar+Al%2DNashr+Lil%2DJami%E2%80%99at%2E)
4. Ahmed Al-Tami. 1993. Arabic” free verse”: The problem of terminology. Journal of Arabic Literature, pages 185–198. [↗](https://doi.org/10.1163/157006493x00050)
5. Zaid Alyafeai, Maged S Al-Shaibani, and Moataz Ahmed. 2023. [Ashaar: automatic analysis and generation of arabic poetry using deep learning approaches](https://md.research.elamur.ai/free/en/papers/alyafeai-2023-ashaar-automatic-analysis-generation-arabic/). arXiv preprint arXiv:2307.06218. [↗](https://arxiv.org/abs/2307.06218)
6. Wissam Antoun, Fady Baly, and Hazem Hajj. 2021. [Aragpt2: Pre-trained transformer for arabic language generation](https://md.research.elamur.ai/free/en/papers/antoun-2021-aragpt2-pre-trained-transformer-arabic/). In Proceedings of the Sixth Arabic Natural Language Processing Workshop, pages 196–207. [↗](https://doi.org/10.48550/arxiv.2012.15520)
7. Mohamed El Ghaly Beheitt and Moez Ben Haj Hmida. 2022. Automatic arabic poem generation with gpt-2. In ICAART (2), pages 366–374. [find](https://scholar.google.com/scholar?q=Mohamed+El+Ghaly+Beheitt+and+Moez+Ben+Haj+Hmida%2E+2022%2E+Automatic+arabic+poem+generation+with+gpt%2D2%2E+In+ICAART+%282%29%2C+pages+366%E2%80%93374%2E)
8. Nazeer Fowzi El-Azma. 1969. Free verse in modern Arabic literature. Indiana University. [find](https://scholar.google.com/scholar?q=Nazeer+Fowzi+El%2DAzma%2E+1969%2E+Free+verse+in+modern+Arabic+literature%2E+Indiana+University%2E)
9. Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, and Colin Raffel. 2022. Byt5: Towards a token-free future with pre-trained byte-to-byte models. Transactions of the Association for Computational Linguistics, 10:291–306. [↗](https://doi.org/10.1162/tacl_a_00461)
10. Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2021. [mt5: A massively multilingual pre-trained text-to-text transformer](https://md.research.elamur.ai/free/en/papers/xue-2021-mt5-massively-multilingual-pre-trained/). In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 483–498. [↗](https://doi.org/10.48550/arxiv.2010.11934)
11. Waleed A. Yousef, Omar M. Ibrahime, Taha M. Madbouly, and Moustafa A. Mahmoud. 2019. [Learning meters of arabic and english poems with recurrent neural networks: a step forward for language understanding and synthesis](https://md.research.elamur.ai/free/en/papers/yousef-2019-learning-meters-arabic-english-poems/). arXiv preprint arXiv:1905.05700. [↗](https://arxiv.org/abs/1905.05700)
12. Taha Zerrouki and Amar Balla. 2017. Tashkeela: Novel corpus of arabic vocalized texts, data for auto-diacritization systems. Data in brief, 11:147. [find](https://scholar.google.com/scholar?q=Taha+Zerrouki+and+Amar+Balla%2E+2017%2E+Tashkeela%3A+Novel+corpus+of+arabic+vocalized+texts%2C+data+for+auto%2Ddiacritization+systems%2E+Data+in+brief%2C+11%3A147%2E)
13. Yousif A El-Imam. 2004. Phonetization of arabic: rules and algorithms. Computer Speech & Language, 18(4):339–373. [↗](https://doi.org/10.1016/s0885-2308(03)00035-4)
14. Mohamad Elzohbi and Richard Zhao. 2024. Let the poem hit the rhythm: Using a byte-based transformer for beat-aligned poetry generation. In Proceedings of the 15th International Conference on Computational Creativity, (ICCC’24), pages 407–411. [↗](https://doi.org/10.48550/arxiv.2406.10174)
15. Dimitry Frolov. 2000. Classical Arabic Verse: History and Theory of ʿArūḍ, volume 21. Brill. [find](https://scholar.google.com/scholar?q=Dimitry+Frolov%2E+2000%2E+Classical+Arabic+Verse%3A+History+and+Theory+of+%CA%BFAr%C5%AB%E1%B8%8D%2C+volume+21%2E+Brill%2E)
16. Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. 2020. [Spanbert: Improving pre-training by representing and predicting spans](https://md.research.elamur.ai/free/en/papers/joshi-2019-spanbert-improving-pre-training-representing/). Transactions of the association for computational linguistics, 8:64–77. [↗](https://doi.org/10.1162/tacl_a_00300)
17. Faisal Qarah. 2024. [Arapoembert: A pretrained language model for arabic poetry analysis](https://md.research.elamur.ai/free/en/papers/qarah-2024-arapoembert-pretrained-language-model-arabic/). arXiv preprint arXiv:2403.12392. [↗](https://arxiv.org/abs/2403.12392)
18. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, and 1 others. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9. [find](https://scholar.google.com/scholar?q=Alec+Radford%2C+Jeffrey+Wu%2C+Rewon+Child%2C+David+Luan%2C+Dario+Amodei%2C+Ilya+Sutskever%2C+and+1+others%2E+2019%2E+Language+models+are+unsupervised+multitask+learners%2E+OpenAI+blog%2C+1%288%29%3A9%2E)
19. Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2020. [Exploring the limits of transfer learning with a unified text-to-text transformer](https://md.research.elamur.ai/free/en/papers/raffel-2019-exploring-limits-transfer-learning-unified/). Journal of machine learning research, 21(140):1–67. [↗](https://doi.org/10.48550/arxiv.1910.10683)

*Updated 1 November 2026*
