Skip to main content
QUICK REVIEW

[论文解读] Ashaar: Automatic Analysis and Generation of Arabic Poetry Using Deep Learning Approaches

Zaid Alyafeai, Maged S. Al-Shaibani|arXiv (Cornell University)|Jul 12, 2023
Topic Modeling被引用 4
一句话总结

本论文提出 Ashaar,一个用于阿拉伯诗歌自动分析与条件生成的深度学习框架,利用四个公开数据集和五个预训练模型,完成包括韵律分类、符号标注、阿鲁迪风格预测以及主题条件诗歌生成在内的多项任务。该系统表现优异,在生成诗歌的韵律分类任务中达到 71.13% 的 top-5 准确率,在零样本评估中符号标注错误率为 50.28%,展现出对阿拉伯诗歌结构强大的生成与分析能力。

ABSTRACT

Poetry holds immense significance within the cultural and traditional fabric of any nation. It serves as a vehicle for poets to articulate their emotions, preserve customs, and convey the essence of their culture. Arabic poetry is no exception, having played a cherished role in the heritage of the Arabic community throughout history and maintaining its relevance in the present era. Typically, comprehending Arabic poetry necessitates the expertise of a linguist who can analyze its content and assess its quality. This paper presents the introduction of a framework called extit{Ashaar} https://github.com/ARBML/Ashaar, which encompasses a collection of datasets and pre-trained models designed specifically for the analysis and generation of Arabic poetry. The pipeline established within our proposed approach encompasses various aspects of poetry, such as meter, theme, and era classification. It also incorporates automatic poetry diacritization, enabling more intricate analyses like automated extraction of the extit{Arudi} style. Additionally, we explore the feasibility of generating conditional poetry through the pre-training of a character-based GPT model. Furthermore, as part of this endeavor, we provide four datasets: one for poetry generation, another for diacritization, and two for Arudi-style prediction. These datasets aim to facilitate research and development in the field of Arabic poetry by enabling researchers and enthusiasts to delve into the nuances of this rich literary tradition.

研究动机与目标

  • 解决当前缺乏用于通过深度学习分析与生成阿拉伯诗歌的标准化工具与数据集的问题。
  • 通过专用模型实现对韵律、主题、时代与阿鲁迪结构等诗歌元素的自动化分析。
  • 利用微调后的基于字符的 GPT 模型,通过指定韵律、押韵(qafiyah)与主题,实现条件化诗歌生成。
  • 提供开放获取的高质量数据集,涵盖韵律、符号标注、阿鲁迪表示与 tafeelat,以支持未来阿拉伯计算语言学研究。
  • 在零样本与少样本设置下评估模型的生成与分析性能,尤其关注符号标注与节奏保持能力。

提出的方法

  • 该框架采用流水线结构,结合基于 Transformer 的模型与基于字符的模型,实现韵律分类、符号标注与阿鲁迪风格预测。
  • 使用基于字符的 GPT 模型进行微调,实现以指定韵律、押韵(qafiyah)与主题为条件的诗歌生成。
  • 整理了四个公开数据集:Ashaar(标注有韵律、主题、时代)、Ashaar diacritized(清洗并标注符号的诗歌)、Ashaar arudi(黄金标准的阿鲁迪表示)、Ashaar tafeelah(每种韵律的完整 tafeelat)。
  • 通过采样策略在零样本设置下评估符号标注模型,无需微调即可评估 WER 与 DER 指标。
  • 通过 1,500 首生成诗歌的多数投票机制评估生成诗歌的韵律分类,测量 n=1、3 和 5 时的 top-n 准确率。
  • 系统采用修改后的 GPT-2 架构(10 层),使用基于字符的分词器进行训练,以保留阿拉伯文字中的形态与符号细节。
Figure 1: General pipeline for Ashaar.
Figure 1: General pipeline for Ashaar.

实验结果

研究问题

  • RQ1深度学习框架能否有效实现对阿拉伯诗歌结构(包括韵律、主题与时代)的自动化分析?
  • RQ2预训练的基于字符的 GPT 模型在以韵律、押韵与主题为条件时,能在多大程度上生成连贯且节奏准确的诗歌?
  • RQ3零样本符号标注模型在未见过的阿拉伯诗歌文本上,无需微调时表现如何?
  • RQ4该系统在从诗歌诗句中预测阿鲁迪风格结构方面的表现如何?
  • RQ5该框架在生成诗歌的节奏评估与韵律分类方面,与当前最先进方法相比表现如何?

主要发现

  • 该框架在生成诗歌的韵律分类任务中达到 71.13% 的 top-5 准确率,尽管模型规模较小,仍优于先前工作。
  • 在采样概率为 7 的条件下,零样本符号标注模型达到 50.28% 的符号标注错误率(DER),表明其在无需微调的情况下表现中等但具有潜力。
  • 该系统在零样本符号标注任务中表现强劲,不同采样概率下 WER 与 DER 均保持在 92% 与 50% 以下。
  • 生成诗歌韵律分类的混淆矩阵显示,更常见的韵律类型预测准确率更高,超过 50% 的韵律类型预测置信度超过 90%。
  • 该模型在节奏评估中达到 64.40% 的 top-1 准确率,超过先前使用 BPE 分词的模型的 56.70%,表明其对节奏结构的编码更优。
  • 整理的数据集——Ashaar、Ashaar diacritized、Ashaar arudi 与 Ashaar tafeelah——已公开发布,支持可复现性与未来阿拉伯诗歌自然语言处理研究。
Figure 3: Confusion matrix for era classification.
Figure 3: Confusion matrix for era classification.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。