Elamur Research⌕
☰
home / papers / 2019 / Learning meters of Arabic and English poems with Recurrent Neural Networks: a step forward for language understanding and synthesis

Learning meters of Arabic and English poems with Recurrent Neural Networks: a step forward for language understanding and synthesis

Paper · 2019 · Waleed A. Yousef, Omar M. Ibrahime, Taha M. Madbouly et al.

Summary

The paper asks whether a neural network can identify a poem's meter from plain written text. Usually only trained prosodists can do this. The authors crawled Arabic and English verse from several non-technical literature websites, cleaned and structured it, and released it publicly as the Poem Comprehensive Dataset (PCD). It holds more than 1.5 million verses. They then trained recurrent classifiers (LSTM, BiLSTM, GRU, BiGRU) on character-level encodings with no handcrafted prosodic features, and compared several input representations, including Arabic text with and without diacritics. The best models reached 96.38% overall accuracy on the 16 classical Arabic meters and 82.31% on 4 English meters. The authors present this as the first machine-learning treatment of meter classification, where earlier work relied on rule-based scansion. It also yields the first ready-to-use public corpus for this task. The work suggests that sequence models can recover a phonetic, rhythmic property that is not written explicitly, which matters for language understanding, style recognition and poetry synthesis.

Key points

  • Classes: the 16 Arabic meters (al-Farahidi's 15 plus one added by his student Al-khfash) and 4 English meters, the latter built from feet such as Iamb and Trochee.
  • Accuracy: 96.38% on Arabic and 82.31% on English, with no feature engineering.
  • Data: over 1.5 million verses, released as PCD. Sources include aldiwan.net, poetry.dctabudhabi.ae and the Eighteenth-Century Poetry Archive.
  • Diacritics improved results only when the rare meters were removed from the data (the 1T setting). On the full data (0T) their effect was inconsistent. Per-class accuracy also tended to fall for meters with few examples.
  • Compute: each run took about one hour (30 epochs at roughly 2 minutes each) on donated Titan X Pascal GPUs. The full sweep took about 384 hours and was still not exhaustive.

Interesting ideas

  • I1. Feeding raw characters to an RNN let it learn a hidden phonetic pattern (vowel/consonant or stress rhythm) without a hand-written scansion rule set, which suggests spelling alone carries much prosodic signal.
  • I2. Al-'arud reduces a line to an abstract symbol string of voweled versus unvoweled letters, and feet do not have to line up with word boundaries, so rhythm is a layer separate from words.
  • I3. Running the same model with and without optional orthographic marks (diacritics) is a cheap ablation that shows whether extra input detail really helps. Here it revealed that the benefit appeared only once rare classes were dropped.
  • I4. The authors plan to force all classes to an equal size n and vary the number of classes k, to separate a class's intrinsic difficulty from its scarcity.
  • I5. They interpret the link between low accuracy and small class size as correlation, possibly caused by meters that are hard or similar to each other, rather than as proof that more data would fix it.

For Mova

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

  • I1 (tokens): A small character-level model could predict syllable count and stress for each lemma in crate en, filling gaps where the dictionary has no pronunciation.
  • I2 (back): Generated text could be mapped to such a stress or syllable string and checked against a target rhythm, giving an explainable test of fluency or of verse output.
  • I3 (learn): Evaluations should report each optional input feature, such as gold POS or morphology, both with and without it, and on both the full and the trimmed label sets, so a gain is not credited to the feature when it comes from label rarity.
  • I4 (learn): Rare dependency labels or rare frame types could be tested in balanced subsets, to tell whether low scores come from small training counts or from confusable categories.
  • I5 (answer): When a reader fails on rare question types, the analysis should look for confusable neighbouring types before simply collecting more examples.

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

 Fields, topics and concepts

Cite

Cite as 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. arXiv:1905.05700.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1905.05700 · arXiv 1905.05700

@misc{yousef2019learning,
  title = {{Learning meters of Arabic and English poems with Recurrent Neural Networks: a step forward for language understanding and synthesis}},
  author = {Waleed A. Yousef, Omar M. Ibrahime, Taha M. Madbouly and Moustafa A. Mahmoud},
  year = {2019},
  doi = {10.48550/arxiv.1905.05700},
  eprint = {1905.05700},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1905.05700}
}

References

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

  1. G. F. Simons, “The 20th Edition of Ethnologue,” 2017. [Online]. Available: https://www.ethnologue.com/ethnoblog/gary-simons/welcome-21st-edition   ↗
  2. A. Kurt and M. Kara, “An Algorithm for the Detection and Analysis of Arud Meter in Diwan poetry,” Turkish Journal of Electrical Engineering and Computer Sciences, vol. 20, no. 6, pp. 948–963, 2012. ↗
  3. M. a. Alnagdawi, H. Rashideh, and A. Fahed, “Finding Arabic Poem Meter Using Context Free Grammar,” J. of Commun. & Comput. Eng., vol. 3, no. 1, pp. 52–59, 2013. ↗
  4. B. Abuata and A. Al-Omari, “A Rule-Based Algorithm for the Detection of Arud Meter in Classical Arabic Poetry,” researchgate.net, 2016. find
  5. W. A. Yousef, O. M. Ibrahime, T. M. Madbouly, M. A. Mahmoud, A. H. El-Kassas, A. O. Hassan, and A. R. Albohy, “Poem Comprehensive Dataset (PCD),” 2018. [Online]. Available: https://hci-lab.github.io/ArabicPoetry-1-Private/#PCD   ↗
  6. “ à@ ñ K YË@ ,” 2013. [Online]. Available: https://www.aldiwan.net   ↗
  7. “ éK Q ª  ‚  Ë@ é «ñ ƒñ ÜÏ@ ,” 2016. [Online]. Available: https://poetry.dctabudhabi.ae ↗
  8. K. Potdar, T. S., and C. D., “A Comparative Study of Categorical Variable Encoding Techniques for Neural Network Classifiers,” International Journal of Computer Applications, vol. 175, no. 4, pp. 7–9, 2017. ↗
  9. M. Agirrezabal, I. Alegria, and M. Hulden, “A Comparison of Feature-Based and Neural Scansion of Poetry,” Ranlp, 2017. find
  10. S. Hochreiter and J. Urgen Schmidhuber, “Long Short-Term Memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. ↗
  11. K. Cho, B. v. Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using RNN encoder-decoder for statistical machine translation,” preprint arXiv:1406.1078, 2014. ↗
  12. Colah, “Understanding LSTM Networks,” 2015. [Online]. Available: http://colah.github.io/posts/2015-08-Understanding-LSTMs/ ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/yousef-2019-learning-meters-arabic-english-poems/