arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.10059cs.FLcs.CL
收藏

使用恶化技巧将重写规则编译为有限状态转录机

Compiling Rewrite Rules to Finite-State Transducers with the Worsening Trick

New College of Florida(佛罗里达新学院);University of Colorado(科罗拉多大学)

Mans Hulden, Michael Ginn

AI总结:

提出基于“恶化技巧”的紧凑编译方案,将重写规则编译为有限状态转录机,支持多种上下文和重写模式,实现简单且易于扩展。

摘要:

有限状态转录机(FST)对于计算语言学和自然语言处理(NLP)中的字符串重写建模至关重要,特别是对于音韵和形态重写规则。编译形式为 $A \ o B / L \, \_ \, R$ 的一般重写规则(其中 $A$、$B$、$L$ 和 $R$ 是任意正则语言)由于重叠匹配和上下文约束而复杂。传统方法(如 Kaplan 和 Kay 或 Karttunen 的方法)依赖于带有辅助标记的复杂转录机组合。本文提出了一种基于“恶化技巧”的紧凑编译方案:生成所有合法的重写候选,然后过滤那些对于相同输入比其他候选更差的候选。该构造作为 PyFoma 中的内置重写编译器实现,支持多个上下文、任意转录、标记、定向重写、权重和并行重写。得到的公式简短且统一,并且在语义一致的情况下,它们重现了与早期方法相同的规则转录机,同时更易于扩展。该实现已在大量重写语法集合和涵盖主要重写模式的自动回归测试套件上针对 foma 进行了验证,得到的转录机除了状态编号外完全匹配。

英文摘要:

Finite-state transducers (FSTs) are essential for modeling string rewriting in computational linguistics and natural language processing (NLP), particularly for phonological and morphological rewrite rules. Compiling general rewrite rules of the form $A \to B / L \, \_ \, R$, where $A$, $B$, $L$, and $R$ are arbitrary regular languages, is complex due to overlapping matches and context constraints. Traditional methods, such as those by Kaplan and Kay or Karttunen, rely on intricate transducer compositions with auxiliary markers. This paper presents a compact compilation scheme based on the "worsening trick'': generate all legal rewrite candidates, then filter candidates that are worse than another candidate for the same input. Implemented as the built-in rewrite compiler in PyFoma, the construction supports multiple contexts, arbitrary transductions, markup, directed rewriting, weights, and parallel rewriting. The resulting formulas are short and uniform, and where semantics coincide, they reproduce the same rule transducers as earlier approaches while remaining easier to extend. The implementation has been validated against foma on both a substantial collection of rewrite grammars and an automated regression suite covering the major rewrite modalities, with the resulting transducers matching exactly apart from state numbering.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑