Grammars for document spanners

Liat Peterfreund*

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

8 Scopus citations

Abstract

We propose a new grammar-based language for defining information-extractors from documents (text) that is built upon the well-studied framework of document spanners for extracting structured data from text. While previously studied formalisms for document spanners are mainly based on regular expressions, we use an extension of context-free grammars, called extraction grammars, to define the new class of context-free spanners. Extraction grammars are simply context-free grammars extended with variables that capture interval positions of the document, namely spans. While regular expressions are efficient for tokenizing and tagging, context-free grammars are also efficient for capturing structural properties. Indeed, we show that context-free spanners are strictly more expressive than their regular counterparts. We reason about the expressive power of our new class and present a pushdown-automata model that captures it. We show that extraction grammars can be evaluated with polynomial data complexity. Nevertheless, as the degree of the polynomial depends on the query, we present an enumeration algorithm for unambiguous extraction grammars that, after quintic preprocessing, outputs the results sequentially, without repetitions, with a constant delay between every two consecutive ones.

Original languageEnglish
Title of host publication24th International Conference on Database Theory, ICDT 2021
EditorsKe Yi, Zhewei Wei
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959771795
DOIs
StatePublished - 1 Mar 2021
Externally publishedYes
Event24th International Conference on Database Theory, ICDT 2021 - Nicosia, Cyprus
Duration: 23 Mar 202126 Mar 2021

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume186
ISSN (Print)1868-8969

Conference

Conference24th International Conference on Database Theory, ICDT 2021
Country/TerritoryCyprus
CityNicosia
Period23/03/2126/03/21

Bibliographical note

Publisher Copyright:
© Liat Peterfreund.

Keywords

  • Constant-Delay Enumeration
  • Context-Free Grammars
  • Document Spanners
  • Information Extraction
  • Pushdown Automata
  • Regular Expressions

Fingerprint

Dive into the research topics of 'Grammars for document spanners'. Together they form a unique fingerprint.

Cite this