一句话:提出语义正则表达式及由少量正负例合成该表达式的学习算法,用于兼顾语法与语义的数据抽取。
许多实际数据抽取任务不仅需要语法模式匹配,还需要对文本内容进行语义推理;传统正则表达式只适合纯语法匹配,难以应对这类任务。为此,论文提出语义正则表达式,它是正则表达式的泛化,支持对文本数据进行语法与语义的联合推理。作者还提出一种新的学习算法,能够从少量正例和负例中合成语义正则表达式;该算法结合神经草图生成与组合式类型导向合成,实现快速有效泛化。作者在工具 Smore 中实现了这些想法,并在多个文本数据集上的代表性数据抽取任务中进行评估。结果表明,语义正则表达式比标准正则表达式更能支持复杂数据抽取任务,且该学习算法显著优于现有工具,包括最先进的神经网络和程序合成工具。
Many data extraction tasks of practical relevance require not only syntactic pattern matching but also semantic reasoning about the content of the underlying text. While regular expressions are very well suited for tasks that require only syntactic pattern matching, they fall short for data extraction tasks that involve both a syntactic and semantic component. To address this issue, we introduce semantic regexes, a generalization of regular expressions that facilitates combined syntactic and semantic reasoning about textual data. We also propose a novel learning algorithm that can synthesize semantic regexes from a small number of positive and negative examples. Our proposed learning algorithm uses a combination of neural sketch generation and compositional type-directed synthesis for fast and effective generalization from a small number of examples. We have implemented these ideas in a new tool called Smore and evaluated it on representative data extraction tasks involving several textual datasets. Our evaluation shows that semantic regexes can better support complex data extraction tasks than standard regular expressions and that our learning algorithm significantly outperforms existing tools, including state-of-the-art neural networks and program synthesis tools.
@article{paperbot1894,
title = {Data Extraction via Semantic Regular Expression Synthesis},
author = {Qiaochu Chen and Arko Banerjee and Çağatay Demiralp and Greg Durrett and Işıl Dillig},
journal = {Proceedings of the ACM on Programming Languages},
volume = {7},
number = {OOPSLA2},
year = {2023},
doi = {10.1145/3622863}
}