Read it in Two Steps: Translating Extremely Low-Resource Languages with Code-Augmented Grammar Books

Chen Zhang, Jiuheng Lin, Xiao Liu, Zekai Zhang, Yansong Feng
6/2/2025
cs.CL

No official code found. Best implementation: Infinite-set/ZhuangRules (7 stars, MIT, last commit 2025-07-09).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

[ACL'25] Read it in Two Steps: Translating Extremely Low-Resource Languages with Code-Augmented Grammar Books

71Shell, PythonMay 22, 20251 years agoMIT

Similar Papers

Cite this paper

@article{zhang2025read,
  title  = {Read it in Two Steps: Translating Extremely Low-Resource Languages with Code-Augmented Grammar Books},
  author = {Chen Zhang and Jiuheng Lin and Xiao Liu and Zekai Zhang and Yansong Feng},
  year   = {2025},
  eprint = {2506.01796},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.01796v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.01796.svg)](https://codeofpaper.com/paper/2506.01796)

Discussion