arXiv:2506.17942cs.FLcs.CL2025-06综述

用伽利略半环实现OpenFst中的φ-转换,高效支持词元化算法。

Tutorial: $φ$-Transductions in OpenFst via the Gallic Semiring

  • 借助伽利略半环绕过OpenFst对φ-转换的限制
  • 成功实现MaxMatch(WordPiece)分词算法
  • 适合需要高效文本分词的语音与自然语言处理研究者

OpenFst 是一个流行的有限状态转换器库,虽支持 φ-转换,但受实现限制,无法直接使用。本文简明教程介绍如何利用 OpenFst 提供的伽利略半环功能,正确实现 φ-转换,并以 Devlin 等(2019)和 Song 等(2021)提出的 MaxMatch(WordPiece)分词算法为例进行演示。配套提供可独立运行的代码示例,便于复现与应用。

原文摘要 · Abstract (English)

OpenFst, a popular finite-state transducer library, supports $φ$-transitions but, due to an implementation constraint, they cannot be used with transducers in a straightforward way. In this short tutorial, we describe how one can use other functionality provided by OpenFst (namely, the Gallic semiring) to correctly implement $φ$-transductions and demonstrate it by implementing the MaxMatch (WordPiece) tokenization algorithm (Devlin et al., 2019; Song et al., 2021). Accompanying self-contained code examples are provided. https://www.openfst.org/twiki/pub/Contrib/FstContrib/phi_transduction_tutorial_code.tgz

有限状态

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。