一种用于有界上下文无关语言的树采样器
A Tree Sampler for Bounded Context-Free Languages
AI总结:
本文针对有界上下文无关语言提出一种树采样方法,通过紧凑表示候选解析森林的代数数据类型,将采样转化为整数均匀采样与惰性解码,实现有放回或无放回的树生成。
摘要:
在本文中,我们提出了一种简单的方法,用于从有界上下文无关语言(BCFL)中进行有放回或无放回的树采样。BCFL 是一种上下文无关语言(CFL),对应于带有空洞的不完整字符串,这些空洞可以由合法的终结符补全。为了解决这一问题,我们引入了一种代数数据类型,该类型能够紧凑地表示多孔字符串的候选解析森林。一旦构建完成,对树进行采样就简化为一个直接的过程:先从整数中无放回地均匀采样,然后惰性地将这些整数解码为树。
英文摘要:
In the following paper, we present a simple method for sampling trees with or without replacement from BCFLs. A BCFL is a context-free language (CFL) corresponding to an incomplete string with holes, which can be completed by valid terminals. To solve this problem, we introduce an algebraic datatype that compactly represents candidate parse forests for porous strings. Once constructed, sampling trees is a straightforward matter of sampling integers uniformly without replacement, then lazily decoding them into trees.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。