用代码形式表达语法规则,让大模型更准地翻译极低资源语言。
Read it in Two Steps: Translating Extremely Low-Resource Languages with Code-Augmented Grammar Books
- 将语法规则转化为代码函数,提升模型理解与应用能力。
- 在极低资源语言翻译中实现13.1%的BLEU提升。
- 适合研究小语种翻译、提示工程与语法增强方法的学者。
尽管大语言模型(LLMs)在利用词典等资源翻译极低资源语言方面展现出潜力,但语法规则的作用仍存争议。本文将语法规则的应用分解为规则检索与应用两个关键步骤,并构建了名为ZhuangRules的模块化语法规则及对应测试句数据集以支持研究。分析表明,规则检索是语法规则翻译中的主要瓶颈。虽然当规则明确提供时,大模型能应用简单规则进行翻译,但在处理复杂规则时表现困难。为此,我们提出将语法规则表示为代码函数,利用其结构相似性及代码对大模型推理的促进作用。实验结果表明,使用代码规则显著提升了规则检索与应用效果,最终使翻译性能提升13.1% BLEU。
原文摘要 · Abstract (English)
While large language models (LLMs) have shown promise in translating extremely low-resource languages using resources like dictionaries, the effectiveness of grammar books remains debated. This paper investigates the role of grammar books in translating extremely low-resource languages by decomposing it into two key steps: grammar rule retrieval and application. To facilitate the study, we introduce ZhuangRules, a modularized dataset of grammar rules and their corresponding test sentences. Our analysis reveals that rule retrieval constitutes a primary bottleneck in grammar-based translation. Moreover, although LLMs can apply simple rules for translation when explicitly provided, they encounter difficulties in handling more complex rules. To address these challenges, we propose representing grammar rules as code functions, considering their similarities in structure and the benefit of code in facilitating LLM reasoning. Our experiments show that using code rules significantly boosts both rule retrieval and application, ultimately resulting in a 13.1% BLEU improvement in translation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。