arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.12350cs.DBcs.FL
收藏

一种文档抽取与转换框架

A framework for extraction and transformation of documents

Cristian Riveros, Markus L. Schmid, Nicole Schweikardt

AI总结:

该研究提出文档抽取转换理论框架,基于document spanners与多正则函数,扩展出regex multispanners,研究线性ET程序的表达性、封闭性并给出线性预处理常数延迟的枚举算法。

摘要:

我们提出了一种面向文本文档抽取与转换的理论框架。我们提出采用两阶段流程:第一阶段从文档中抽取跨度元组,第二阶段将跨度元组的内容映射为新文档。我们将抽取阶段建立在document spanners(文档生成器)框架之上,转换阶段则基于多正则函数理论,即具有多项式增长性的正则字符串到字符串函数类。\n 为支持实际的抽取-转换场景,我们提出对由正则公式描述的document spanners进行扩展,将其从跨度元组拓展为所谓的多跨度元组,其中变量被映射到跨度集合。我们证明这种被称为regex multispanners(正则多生成器)的扩展,具备与正则公式描述的标准生成器相同的优良性质。在我们的框架中,一个抽取-转换(ET)程序由一个regex multispanner后接一个多正则函数构成。\n 本文研究了当转换函数为线性时(称为线性ET程序),ET程序的表达能力与求值问题。我们证明,在包语义下,线性ET程序与非确定性流式字符串转换器的表达能力相当。此外,我们还证明线性ET程序在复合运算下是封闭的。最后,我们提出了一种枚举算法,可对文档上的任意线性ET程序进行求值,其预处理时间为线性时间,且延迟为常数。

英文摘要:

We present a theoretical framework for the extraction and transformation of text documents. We propose to use a two-phase process where the first phase extracts span-tuples from a document, and the second phase maps the content of the span-tuples into new documents. We base the extraction phase on the framework of document spanners and the transformation phase on the theory of polyregular functions, the class of regular string-to-string functions with polynomial growth. For supporting practical extract-transform scenarios, we propose an extension of document spanners described by regex formulas from span-tuples to so-called multispan-tuples, where variables are mapped to sets of spans. We prove that this extension, called regex multispanners, has the same desirable properties as standard spanners described by regex formulas. In our framework, an Extract-Transform (ET) program is given by a regex multispanner followed by a polyregular function. In this paper, we study the expressibility and evaluation problem of ET programs when the transformation function is linear, called linear ET programs. We show that linear ET programs are equally expressive as non-deterministic streaming string transducers under bag semantics. Moreover, we show that linear ET programs are closed under composition. Finally, we present an enumeration algorithm for evaluating every linear ET program over a document with linear time preprocessing and constant delay.

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

↑