Cristian Riveros, Markus L. Schmid, Nicole Schweikardt
{"title":"文件提取和转换框架","authors":"Cristian Riveros, Markus L. Schmid, Nicole Schweikardt","doi":"arxiv-2405.12350","DOIUrl":null,"url":null,"abstract":"We present a theoretical framework for the extraction and transformation of\ntext documents. We propose to use a two-phase process where the first phase\nextracts span-tuples from a document, and the second phase maps the content of\nthe span-tuples into new documents. We base the extraction phase on the\nframework of document spanners and the transformation phase on the theory of\npolyregular functions, the class of regular string-to-string functions with\npolynomial growth. For supporting practical extract-transform scenarios, we propose an extension\nof document spanners described by regex formulas from span-tuples to so-called\nmultispan-tuples, where variables are mapped to sets of spans. We prove that\nthis extension, called regex multispanners, has the same desirable properties\nas standard spanners described by regex formulas. In our framework, an\nExtract-Transform (ET) program is given by a regex multispanner followed by a\npolyregular function. In this paper, we study the expressibility and evaluation problem of ET\nprograms when the transformation function is linear, called linear ET programs.\nWe show that linear ET programs are equally expressive as non-deterministic\nstreaming string transducers under bag semantics. Moreover, we show that linear\nET programs are closed under composition. Finally, we present an enumeration\nalgorithm for evaluating every linear ET program over a document with linear\ntime preprocessing and constant delay.","PeriodicalId":501124,"journal":{"name":"arXiv - CS - Formal Languages and Automata Theory","volume":"222 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-05-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A framework for extraction and transformation of documents\",\"authors\":\"Cristian Riveros, Markus L. Schmid, Nicole Schweikardt\",\"doi\":\"arxiv-2405.12350\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present a theoretical framework for the extraction and transformation of\\ntext documents. We propose to use a two-phase process where the first phase\\nextracts span-tuples from a document, and the second phase maps the content of\\nthe span-tuples into new documents. We base the extraction phase on the\\nframework of document spanners and the transformation phase on the theory of\\npolyregular functions, the class of regular string-to-string functions with\\npolynomial growth. For supporting practical extract-transform scenarios, we propose an extension\\nof document spanners described by regex formulas from span-tuples to so-called\\nmultispan-tuples, where variables are mapped to sets of spans. We prove that\\nthis extension, called regex multispanners, has the same desirable properties\\nas standard spanners described by regex formulas. In our framework, an\\nExtract-Transform (ET) program is given by a regex multispanner followed by a\\npolyregular function. In this paper, we study the expressibility and evaluation problem of ET\\nprograms when the transformation function is linear, called linear ET programs.\\nWe show that linear ET programs are equally expressive as non-deterministic\\nstreaming string transducers under bag semantics. Moreover, we show that linear\\nET programs are closed under composition. Finally, we present an enumeration\\nalgorithm for evaluating every linear ET program over a document with linear\\ntime preprocessing and constant delay.\",\"PeriodicalId\":501124,\"journal\":{\"name\":\"arXiv - CS - Formal Languages and Automata Theory\",\"volume\":\"222 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-05-20\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Formal Languages and Automata Theory\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2405.12350\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Formal Languages and Automata Theory","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2405.12350","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
我们提出了一个提取和转换文本文档的理论框架。我们建议使用两阶段流程,第一阶段从文档中提取跨元组,第二阶段将跨元组的内容映射到新文档中。我们将提取阶段建立在文档跨度框架的基础上,将转换阶段建立在多正则函数理论的基础上,多正则函数是一类具有多项式增长的正则字符串到字符串函数。为了支持实际的提取-转换应用场景,我们提出了一种由 regex 公式描述的文档生成器的扩展,即从 span 元组扩展到所谓的多 span 元组,其中变量被映射到 spans 集合。我们证明,这种扩展(称为 regex 多跨度)与 regex 公式描述的标准跨度具有相同的理想特性。在我们的框架中,一个提取-转换(ET)程序由一个 regex 多跨度程序和一个多正则函数给出。在本文中,我们研究了转换函数为线性时 ET 程序的可表达性和评估问题,这些程序被称为线性 ET 程序。我们证明,在 bag 语义下,线性 ET 程序与非确定性流式字符串转换器具有同等的表达能力。此外,我们还证明了线性 ET 程序在组合下是封闭的。最后,我们提出了一种枚举算法,用于以线性时间预处理和恒定延迟评估文档上的每个线性 ET 程序。
A framework for extraction and transformation of documents
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.