Data Extraction via Semantic Regular Expression Synthesis
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). First posted on arXiv 17 May 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 2; 2024: 1; 2025: 3; 2026: 2.
8 papers.
- 2023DataVinci: Learning Syntactic and Semantic String Repairscited by 6
- 2024Uncertainty Quantification for Neurosymbolic Programs via Compositional Conformal Predictioncited by 4
- 2025Extracting Explainable Dates From Medical Images By Reverse-Engineering UNIX Timestampscited by 1
- 2023Correct and Optimal: the Regular Expression Inference Challengecited by 0
- 2025Lost in Translation? Converting RegExes for Log Parsing into Dynatrace Pattern Languagecited by 0
- 2025The Case for Instance-Optimized LLMs in OLAP Databasescited by 0
- 2026MetaSpace: Metamorphic Testing for Spatial Cognition in Embodied Agentscited by 0
- 2026Agents as Software: A Programming Languages Agenda for Agent Reliabilitycited by 0
- 2026Agents as Software: A Programming Languages Agenda for Agent Reliability26 Sep 2026
- 2026MetaSpace: Metamorphic Testing for Spatial Cognition in Embodied Agents26 Jul 2026
- 2025The Case for Instance-Optimized LLMs in OLAP Databases7 Jul 2025
- 2025Lost in Translation? Converting RegExes for Log Parsing into Dynatrace Pattern Language24 Jun 2025
- 2025Extracting Explainable Dates From Medical Images By Reverse-Engineering UNIX Timestamps16 May 2025
- 2024Uncertainty Quantification for Neurosymbolic Programs via Compositional Conformal Prediction24 May 2024
- 2023DataVinci: Learning Syntactic and Semantic String Repairs21 Aug 2023
- 2023Correct and Optimal: the Regular Expression Inference Challenge15 Aug 2023