cs.CLMar 11, 2026

Artificial Intelligence for Sentiment Analysis of Persian Poetry

Authors: Arash Zargar, Abolfazl Moshiri, Mitra Shafaei, Shabnam Rahimi-Golkhandan, Mohamad Tavakoli-Targhi, Farzad Khalvati

Organizations: Department of Mechanical & Industrial Engineering; Vector Institute for Artificial Intelligence; University of Toronto; Toronto, Canada · Department of Near & Middle Eastern Civilizations; University of Toronto; Toronto, Canada · Independent Researcher · Department of Medical Imaging and Institute of Medical Science; Department of Mechanical & Industrial Engineering; Department of Computer Science; Vector Institute for Artificial Intelligence; University of Toronto; Toronto, Canada

Abstract

Recent advancements of the Artificial Intelligence (AI) have led to the development of large language models (LLMs) that are capable of understanding, analysing, and creating textual data. These language models open a significant opportunity in analyzing the literature and more specifically poetry. In the present work, we employ multiple Bidirectional encoder representations from transformers (BERT) and Generative Pre-trained Transformer (GPT) based language models to analyze the works of two prominent Persian poets: Jalal al-Din Muhammad Rumi (Rumi) and Parvin E'tesami. The main objective of this research is to investigate the capability of the modern language models in grasping complexities of the Persian poetry and explore potential correlations between the poems' sentiment and their meters. Our findings in this study indicates that GPT4o language model can reliably be used in analysis of Persian poetry. Furthermore, the results of our sentiment analysis revealed that in general, Rumi's poems express happier sentiments compared to Parvin E'tesami's poems. Furthermore, comparing the utilization of poetic meters highlighted Rumi's poems superiority in using meters to express a wider variety of sentiments. These findings are significant as they confirm that LLMs can be effectively applied in conducting computer-based semantic studies, where human interpretations are not required, and thereby significantly reducing potential biases in the analysis.

Figures & tables

Explore similar work

CardsList
  1. PersLitEval: Fine-grained Benchmark and Evaluation of LLMs on Persian Literature Questions

    May 26, 2026Ruhallah Niazi, Faeze Ghorbanpour, Alexander FraserLLM EvaluationQuestion Answering

  2. Poller: Are LLMs Suitable for Evaluating the Poetry Understanding Task?

    Jun 29, 2026Shanshan Wang, Derek F. Wong, Jingming Yao +1LLM EvaluationLLM-as-a-Judge

  3. Seeing the Poem: Image-Semantic Detection of AI-Generated Modern Chinese Poetry with MLLMs

    May 21, 2026Shanshan Wang, Fengying Ye, Hanjia Lyu +6Vision-Language ModelsAI-Generated Text Detection