基于语义正则表达式合成的数据提取
Data Extraction via Semantic Regular Expression Synthesis
AI总结:
针对正则表达式无法兼顾句法与语义推理的数据提取痛点,提出结合神经草图生成与类型导向合成的语义正则表达式合成算法,开发工具Smore,在多数据集上性能优于现有方法。
摘要:
许多具有实际相关性的数据提取任务不仅需要句法模式匹配,还需要对底层文本内容进行语义推理。虽然正则表达式非常适合仅需句法模式匹配的任务,但对于同时涉及句法和语义成分的数据提取任务,它们存在不足。为解决这一问题,我们提出了语义正则表达式(semantic regexes),这是正则表达式的一种泛化形式,可支持对文本数据的句法与语义联合推理。我们还提出了一种新型学习算法,能够从少量正例和负例中合成语义正则表达式。该学习算法结合了神经草图生成与组合式类型导向合成技术,可基于少量样本实现快速且有效的泛化。我们在一款名为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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。