skip to main content
research-article

Prose2Poem: The Blessing of Transformers in Translating Prose to Persian Poetry

Published:17 June 2023Publication History
Skip Abstract Section

Abstract

Persian poetry has consistently expressed its philosophy, wisdom, speech, and rationale based on its couplets, making it an enigmatic language on its own to both native and non-native speakers. Nevertheless, the noticeable gap between Persian prose and poems has left the two pieces of literature mediumless. Having curated a parallel corpus of prose and their equivalent poems, we introduce a novel Neural Machine Translation approach for translating prose to ancient Persian poetry using transformer-based language models in an exceptionally low-resource setting. Translating input prose into ancient Persian poetry presents two primary challenges: In addition to being reasonable in conveying the same context as the input prose, the translation must also satisfy poetic standards. Hence, we designed our method consisting of three stages. First, we trained a transformer model from scratch to obtain an initial translations of the input prose. Next, we designed a set of heuristics to leverage contextually rich initial translations and produced a poetic masked template. In the last stage, we pretrained different variations of BERT on a poetry corpus to use the masked language modelling technique to obtain final translations. During the evaluation process, we considered both automatic and human assessment. The final results demonstrate the eligibility and creativity of our novel heuristically aided approach among Literature professionals and non-professionals in generating novel Persian poems.

REFERENCES

  1. [1] Agirrezabal Manex, Alegria Iñaki, and Hulden Mans. 2016. Machine learning for metrical analysis of English poetry. In Proceedings of the 26th International Conference on Computational Linguistics: Technical Papers (COLING’16). The COLING 2016 Organizing Committee, Osaka, Japan, 772781.Google ScholarGoogle Scholar
  2. [2] Agirrezabal Manex, Arrieta Bertol, Astigarraga Aitzol, and Hulden Mans. 2013. POS-tag based poetry generation with WordNet. In Proceedings of the 14th European Workshop on Natural Language Generation. Association for Computational Linguistics, 162166.Google ScholarGoogle Scholar
  3. [3] Bena Brendan and Kalita Jugal. 2020. Introducing Aspects of Creativity in Automatic Poetry Generation. arxiv:2002.02511 [cs.CL]. Retrieved from https://arxiv.org/abs/2002.02511.Google ScholarGoogle Scholar
  4. [4] Bird Steven, Klein Ewan, and Loper Edward. 2009. Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit. O’Reilly Media, Inc.Google ScholarGoogle Scholar
  5. [5] Bolbolzaban. 2020. GPT2-Persian. Retrieved from http://bolbolzaban.com/.Google ScholarGoogle Scholar
  6. [6] Ricardo Campos, Vítor Mangaravite, Arian Pasquali, Alípio Jorge, Célia Nunes, and Adam Jatowt. 2020. YAKE! Keyword extraction from single documents using multiple local features. Information Sciences 509 (2020), 257–289. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. [7] Tuhin Chakrabarty, A. Saakyan, and Smaranda Muresan. 2021. Don’t go far off: An empirical study on neural poetry translation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. Online and Punta Cana, Dominican Republic. Association for Computational Linguistics, 7253–7265.Google ScholarGoogle Scholar
  8. [8] Chen Huimin, Yi Xiaoyuan, Sun M., Li Wenhao, Yang Cheng, and Guo Z.. 2019. Sentiment-controllable chinese poetry generation. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI’19).Google ScholarGoogle ScholarCross RefCross Ref
  9. [9] Conrey Sean M.. 2007. A canvas for words: Spatial and temporal attitudes in the writing of poems. New Writ. 4, 1 (2007), 7990. Google ScholarGoogle ScholarCross RefCross Ref
  10. [10] Rosa Javier de la, Pérez Alvaro, Sisto Mirella De, Lorenzo Laura Hernández, Díaz Aitor, Ros Salvador, and Garcia Elena Gonzalez-Blanco. 2021. Transformers analyzing poetry: Multilingual metrical pattern prediction with transfomer-based language models. Neural Comput. Appl. (112021), 16. Google ScholarGoogle ScholarCross RefCross Ref
  11. [11] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805. Retrieved from https://arxiv.org/abs/1810.04805.Google ScholarGoogle Scholar
  12. [12] Dunder Ivan, Seljan Sanja, and Pavlovski Marko. 2020. Automatic machine translation of poetry and a low-resource language pair. In Proceedings of the 43rd International Convention on Information, Communication and Electronic Technology (MIPRO’20), 10341039.Google ScholarGoogle ScholarCross RefCross Ref
  13. [13] Elaheh Fadaee. 2011. Poetry in translation: A comparative study of Silverstein’s monolingual and bilingual (English to Persian) poems. Int. J. Engl. Lit. 2, 3 (2011), 7582.Google ScholarGoogle Scholar
  14. [14] Farahani Mehrdad, Gharachorloo Mohammad, Farahani Marzieh, and Manthouri Mohammad. 2020. ParsBERT: Transformer-based model for Persian language understanding. arxiv:2005.12515 [cs.CL]. Retrieved from https://arxiv.org/abs/2005.12515.Google ScholarGoogle Scholar
  15. [15] Ghazvininejad Marjan, Choi Yejin, and Knight Kevin. 2018. Neural poetry translation. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers). Association for Computational Linguistics, 6771. Google ScholarGoogle ScholarCross RefCross Ref
  16. [16] Ghazvininejad Marjan, Shi Xing, Priyadarshi Jay, and Knight Kevin. 2017. Hafez: An interactive poetry generation system. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL’17), System Demonstrations. Association for Computational Linguistics, 4348.Google ScholarGoogle ScholarCross RefCross Ref
  17. [17] Memduh Gokirmak. 2021. Converting prose into poetry using neural networks. Master thesis. Charles University, Faculty of Mathematics and Physics, Institute of Formal and Applied Linguistics, Prague.Google ScholarGoogle Scholar
  18. [18] Gulcehre Caglar, Firat Orhan, Xu Kelvin, Cho Kyunghyun, Barrault Loic, Lin Huei-Chi, Bougares Fethi, Schwenk Holger, and Bengio Yoshua. 2015. On using monolingual corpora in neural machine translation. arxiv:1503.03535 [cs.CL]Google ScholarGoogle Scholar
  19. [19] Hagberg Aric A., Schult Daniel A., and Swart Pieter J.. 2008. Exploring network structure, dynamics, and function using networkx. In Proceedings of the 7th Python in Science Conference, Varoquaux Gaël, Vaught Travis, and Millman Jarrod (Eds.). 1115.Google ScholarGoogle Scholar
  20. [20] Han Lifeng. 2018. Machine translation evaluation resources and methods: A survey. arxiv:1605.04515 [cs.CL]. Retrieved from https://arxiv.org/abs/1605.04515.Google ScholarGoogle Scholar
  21. [21] HooshvareTeam. 2021. ParsGPT2 the Persian Version of GPT2. Retrieved from https://github.com/hooshvare/parsgpt.Google ScholarGoogle Scholar
  22. [22] Hopkins Jack and Kiela Douwe. 2017. Automatically generating rhythmic verse with neural networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, Vancouver, Canada, 168178. Google ScholarGoogle ScholarCross RefCross Ref
  23. [23] Jhamtani Harsh, Mehta Sanket Vaibhav, Carbonell Jaime, and Berg-Kirkpatrick Taylor. 2019. Learning rhyming constraints using structured adversaries. In Proceedings of the Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP’19). Association for Computational Linguistics, 60256031. Google ScholarGoogle ScholarCross RefCross Ref
  24. [24] Kesarwani Vaibhav, Inkpen Diana, Szpakowicz Stan, and Tanasescu Chris. 2017. Metaphor detection in a poetry corpus. In Proceedings of the Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature. Association for Computational Linguistics, 19. Google ScholarGoogle ScholarCross RefCross Ref
  25. [25] Reza Khanmohammadi and Seyed Abolghasem Mirroshandel. 2020. PGST: A polyglot gender style transfer method. arXiv preprint arXiv:2009.01040.Google ScholarGoogle Scholar
  26. [26] Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. ALBERT: A lite BERTt for self-supervised learning of language representations. In Proceedings of (ICLR’19).Google ScholarGoogle Scholar
  27. [27] Langkilde Irene and Knight Kevin. 1998. Generation that exploits corpus-based statistical knowledge. In Proceedings of the 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics, Volume 1. Association for Computational Linguistics, 704710. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. [28] Lau Jey Han, Cohn Trevor, Baldwin Timothy, Brooke Julian, and Hammond Adam. 2018. Deep-speare: A joint neural model of poetic language, meter and rhyme. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 19481958. Google ScholarGoogle ScholarCross RefCross Ref
  29. [29] Quoc Le and Tomas Mikolov. 2014. Distributed representations of sentences and documents. In Proceedings of the International Conference on Machine Learning. 1188–1196.Google ScholarGoogle Scholar
  30. [30] Lin Chin-Yew. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out. Association for Computational Linguistics, 7481.Google ScholarGoogle Scholar
  31. [31] Liu Bei, Fu Jianlong, Kato Makoto P., and Yoshikawa Masatoshi. 2018. Beyond narrative description. In Proceedings of the 26th ACM International Conference on Multimedia. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. [32] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, M. Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A robustly optimized BERT pretraining approach. arXiv abs/1907.11692. Retrieved from https://arxiv.org/abs/1907.11692.Google ScholarGoogle Scholar
  33. [33] Loller-Andersen Malte and Gambäck Björn. 2018. Deep learning-based poetry generation given visual input. In Proceedings of the International Conference on Computational Creativity (ICCC’18).Google ScholarGoogle Scholar
  34. [34] Mikolov Tomas, Chen Kai, Corrado Greg, and Dean Jeffrey. 2013. Efficient estimation of word representations in vector space. arxiv:1301.3781 [cs.CL]. Retrieved from https://arxiv.org/abs/1301.3781.Google ScholarGoogle Scholar
  35. [35] Moradi Neda and Jabbari Mohammad. 2020. A study of rendering metaphors in the translation of the titles of persian medical articles. Budap. Int. Res. Crit. Ling. Educ. J. 3 (022020), 540551. Google ScholarGoogle ScholarCross RefCross Ref
  36. [36] Marmik Pandya. 2016. NLP based poetry analysis and generation. Technical Report. Google ScholarGoogle ScholarCross RefCross Ref
  37. [37] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a Method for Automatic Evaluation of Machine Translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics. Philadelphia, Pennsylvania, Association for Computational Linguistics, 311–318.Google ScholarGoogle Scholar
  38. [38] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. Technical Report. OpenAI.Google ScholarGoogle Scholar
  39. [39] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019. DistilBERT, A distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108 (2019).Google ScholarGoogle Scholar
  40. [40] Santillan Marvin C. and Azcarraga Arnulfo P.. 2020. Poem generation using transformers and Doc2Vec embeddings. In Proceedings of the International Joint Conference on Neural Networks (IJCNN’20). 17. Google ScholarGoogle ScholarCross RefCross Ref
  41. [41] Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Improving neural machine translation models with monolingual data. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 86–96. Google ScholarGoogle ScholarCross RefCross Ref
  42. [42] Stanley Xie, Ruchir Rastogi, and Max Chang. 2017. Deep poetry: Word-level and character-level language models for Shakespearean sonnet generation. Tech. rep., Stanford University. Natural Language Processing with Deep Learning Course.Google ScholarGoogle Scholar
  43. [43] Tanasescu Chris, Paget Bryan, and Inkpen D.. 2016. Automatic classification of poetry by meter and rhyme. In Proceedings of the Florida AI Research Society Conference (FLAIRS’16).Google ScholarGoogle Scholar
  44. [44] Cruys Tim Van de. 2020. Automatic poetry generation from prosaic text. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, 24712480. Google ScholarGoogle ScholarCross RefCross Ref
  45. [45] Weitzel Leila, Prati Ronaldo, and Aguiar Raul. 2016. The Comprehension of Figurative Language: What Is the Influence of Irony and Sarcasm on NLP Techniques? Vol. 639. Google ScholarGoogle ScholarCross RefCross Ref
  46. [46] Xie S.. 2017. Deep poetry: Word-level and character-level language models for shakespearean sonnet generation.Google ScholarGoogle Scholar
  47. [47] Xu Linli, Jiang Liang, Qin Chuan, Wang Zhe, and Du Dongfang. 2018. How images inspire poems: Generating classical Chinese poetry from images with memory networks. arxiv:1803.02994 [cs.CL]. Retrieved from https://arxiv.org/abs/1803.02994.Google ScholarGoogle Scholar
  48. [48] Yi Xiaoyuan, Sun Maosong, Li Ruoyu, and Li Wenhao. 2018. Automatic poetry generation with mutual reinforcement learning. In Proceedings of the Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, 31433153. Google ScholarGoogle ScholarCross RefCross Ref
  49. [49] Zhang Lingyi and Gao Junhui. 2017. A comparative study to understanding about poetics based on natural language processing. Open J. Mod. Ling. 07 (012017), 229237. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Prose2Poem: The Blessing of Transformers in Translating Prose to Persian Poetry

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM Transactions on Asian and Low-Resource Language Information Processing
      ACM Transactions on Asian and Low-Resource Language Information Processing  Volume 22, Issue 6
      June 2023
      635 pages
      ISSN:2375-4699
      EISSN:2375-4702
      DOI:10.1145/3604597
      Issue’s Table of Contents

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 June 2023
      • Online AM: 14 April 2023
      • Accepted: 11 April 2023
      • Revised: 25 February 2023
      • Received: 24 November 2021
      Published in tallip Volume 22, Issue 6

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
    • Article Metrics

      • Downloads (Last 12 months)52
      • Downloads (Last 6 weeks)9

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Full Text

    View this article in Full Text.

    View Full Text
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!