arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1901.04182cs.DB
收藏

文档生成器上关系代数的复杂性界

Complexity Bounds for Relational Algebra over Document Spanners

Liat Peterfreund, Dominik D. Freydenberger, Benny Kimelfeld, Markus Kröll

摘要:

我们研究了在关系代数(RA)中对正则表达式公式提取的关系(即,带有捕获变量的正则表达式)。这样的查询,也被称为常规文档空间,被示出为对于每个正RA表达式具有多项式延迟的评估(即,仅由自然连接、投影和联合组成);在这里,RA表达式是固定的,输入由正则表达式公式和文档组成。在这项工作中,我们探讨了两个基本概括的含义。第一种是采用Maturana等人提出和研究的“无模式”语义。第二种是超越正RA,允许差分算子。我们发现,这两个推广引入计算难度:它是难以计算的自然连接下的无模式语义的两个正则表达式公式,和普通和无模式语义下的两个正则表达式公式之间的差异。尽管如此,我们提出并分析了语法约束,在RA表达式和正则表达式公式在手,这样的表达能力是完全保留,但,评估可以与多项式延迟。与以前的工作RA正则表达式公式,我们的技术是不是(可证明不能)基于正则表达式公式的静态编译,而是一个特设的编译成一个自动机,包括查询和文档。这种方法还允许我们在RA表达式中包含黑盒提取器。

英文摘要:

We investigate the complexity of evaluating queries in Relational Algebra (RA) over the relations extracted by regex formulas (i.e., regular expressions with capture variables) over text documents. Such queries, also known as the regular document spanners, were shown to have an evaluation with polynomial delay for every positive RA expression (i.e., consisting of only natural joins, projections and unions); here, the RA expression is fixed and the input consists of both the regex formulas and the document. In this work, we explore the implication of two fundamental generalizations. The first is adopting the "schemaless" semantics for spanners, as proposed and studied by Maturana et al. The second is going beyond the positive RA to allowing the difference operator. We show that each of the two generalizations introduces computational hardness: it is intractable to compute the natural join of two regex formulas under the schemaless semantics, and the difference between two regex formulas under both the ordinary and schemaless semantics. Nevertheless, we propose and analyze syntactic constraints, on the RA expression and the regex formulas at hand, such that the expressive power is fully preserved and, yet, evaluation can be done with polynomial delay. Unlike the previous work on RA over regex formulas, our technique is not (and provably cannot be) based on the static compilation of regex formulas, but rather on an ad-hoc compilation into an automaton that incorporates both the query and the document. This approach also allows us to include black-box extractors in the RA expression.

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

↑