## Parsing and Generation as Datalog Queries

### Cached

### Download Links

- [acl.ldc.upenn.edu]
- [aclweb.org]
- [wing.comp.nus.edu.sg]
- [www.aclweb.org]
- [aclweb.org]
- [aclweb.org]
- [www.aclweb.org]
- DBLP

### Other Repositories/Bibliography

Citations: | 12 - 1 self |

### BibTeX

@MISC{Kanazawa_parsingand,

author = {Makoto Kanazawa},

title = {Parsing and Generation as Datalog Queries},

year = {}

}

### OpenURL

### Abstract

We show that the problems of parsing and surface realization for grammar formalisms with “context-free ” derivations, coupled with Montague semantics (under a certain restriction) can be reduced in a uniform way to Datalog query evaluation. As well as giving a polynomialtime algorithm for computing all derivation trees (in the form of a shared forest) from an input string or input logical form, this reduction has the following complexity-theoretic consequences for all such formalisms: (i) the decision problem of recognizing grammaticality (surface realizability) of an input string (logical form) is in LOGCFL; and (ii) the search problem of finding one logical form (surface string) from an input string (logical form) is in functional LOGCFL. Moreover, the generalized supplementary magic-sets rewriting of the Datalog program resulting from the reduction yields efficient Earley-style algorithms for both parsing and generation. 1

### Citations

1077 |
Principles of Database and Knowledgebase Systems, volume 2
- Ullman
- 1989
(Show Context)
Citation Context ...i, j) :− caught(i, j). Conj(i, j) :− and(i, j). Det(i, j) :− a(i, j). N(i, j) :− unicorn(i, j). Figure 2: The Datalog representation of a CFG. By naive (or seminaive) bottom-up evaluation (see, e.g., =-=Ullman, 1988-=-), the answer to such a query can be computed in polynomial time in the size of the database for any Datalog program. By recording rule instances rather than derived facts, a packed representation of ... |

651 | An introduction to tree adjoining grammars
- Joshi
- 1987
(Show Context)
Citation Context ...atalog. In this paper, we show that a similar reduction to Datalog is possible for more powerful grammar formalisms with “context-free” derivations, such as (multi-component) tree-adjoining grammars (=-=Joshi and Schabes, 1997-=-; Weir, 1988), IO macro grammars (Fisher, 1968), and (parallel) multiple contextfree grammars (Seki et al., 1991). For instance, the TAG in Figure 3 is represented by the Datalog program in Figure 4. ... |

249 | On the Power of Magic
- Beeri, Ramakrishnan
- 1987
(Show Context)
Citation Context ...o Datalog makes it possible to apply to parsing and generation sophisticated evaluation techniques for Datalog queries; in particular, an application of generalized supplementary magicsets rewriting (=-=Beeri and Ramakrishnan, 1991-=-) automatically yields Earley-style algorithms for both parsing and generation. The reduction can also be used to obtain a tight upper bound, namely LOGCFL, on the computational complexity of the prob... |

169 | Principles and implementation of deductive parsing
- Shieber, Schabes, et al.
- 1995
(Show Context)
Citation Context ...m. The result of the generalized supplementary magic-sets rewriting of Beeri and Ramakrishnan (1991) applied to the Datalog program representing a CFG essentially coincides with the deduction system (=-=Shieber et al., 1995-=-) or uninstantiated parsing system (Sikkel, 1997) for Earley parsing. By applying the same rewriting method to Datalog programs representing almost linear CFLGs, we can obtain efficient parsing and ge... |

94 |
On multiple context-free grammars
- Seki, Matsumura, et al.
- 1991
(Show Context)
Citation Context ...th “context-free” derivations, such as (multi-component) tree-adjoining grammars (Joshi and Schabes, 1997; Weir, 1988), IO macro grammars (Fisher, 1968), and (parallel) multiple contextfree grammars (=-=Seki et al., 1991-=-). For instance, the TAG in Figure 3 is represented by the Datalog program in Figure 4. Moreover, the method of reducS A ɛ ANA a A d b A ∗ NA c Figure 3: A TAG with one initial tree (left) and one au... |

80 |
Basic Simple Type Theory
- Hindley
- 1997
(Show Context)
Citation Context ...nal conventions in typed λcalculus. Thus, an application M1M2M3 (written without parentheses) associates to the left,λx.λy.M is abbreviated toλxy.M, andα→β→γ stands forα→(β→γ). We refer the reader to =-=Hindley, 1997-=- or Sørensen and Urzyczyn, 2006 for standard notions used in simply typedλ-calculus.sS(X1X2) :− NP(X1), VP(X2). VP(λx.X2(λy.X1yx)) :− V(X1), NP(X2). V(λyx.X2(X1yx)(X3yx)) :− V(X1), Conj(X2), V(X3). NP... |

71 | Bottom-up beats top-down for datalog - Ullman - 1989 |

70 | Parsing Schemata
- Sikkel
- 1999
(Show Context)
Citation Context ...s rewriting of Beeri and Ramakrishnan (1991) applied to the Datalog program representing a CFG essentially coincides with the deduction system (Shieber et al., 1995) or uninstantiated parsing system (=-=Sikkel, 1997-=-) for Earley parsing. By applying the same rewriting method to Datalog programs representing almost linear CFLGs, we can obtain efficient parsing and generation algorithms for various grammar formalis... |

33 | Parallel complexity of logical query programs - Ullman, Gelder - 1986 |

27 |
A Short Introduction to Intuitionistic Logic
- Mints
- 2000
(Show Context)
Citation Context ... typingΓ ⊢ N ′ :α must be negatively non-duplicated in the sense that each atomic type has at most one negative occurrence in it. By Aoto and Ono’s (1994) generalization of the Coherence Theorem (see =-=Mints, 2000-=-), it follows that everyλterm P such thatΓ ′ ⊢ P :α for someΓ ′ ⊆Γ must be βη-equal to N ′ (and consequently to N). Given the one-one correspondence between the grammar rules and the Datalog rules, a ... |

19 |
Logic programming and parallel complexity
- Kanellakis
- 1988
(Show Context)
Citation Context ...or q whose fringe (i.e., sequence of leaves) is of length at most p(n). For such P andD, it is known that { (D, q)|D∈D, P∪ D derives q} is in the complexity class LOGCFL (Ullman and Van Gelder, 1988; =-=Kanellakis, 1988-=-). We state without proof that the database-query pair (D, q) representing an inputλ-term N can be computed in logspace. By padding D with extra useless facts so that the size of D becomes equal to th... |

12 | A complete, efficient sentencerealization algorithm for unification grammar - Moore - 2002 |

10 |
The complexity of languages generated by attribute grammars
- Engelfriet
- 1986
(Show Context)
Citation Context ...to parsing and recognition of input strings, polynomial-time algorithms and the LOGCFL upper bound on the computational complexity are already known for the grammar formalisms covered by our results (=-=Engelfriet, 1986-=-); nevertheless, we believe that our reduction to Datalog offers valuable insights. Concerning generation, our results seem to be entirely new. 1 2 Context-free grammars on λ-terms Consider an augment... |

10 |
Encoding second order string ACG with deterministic tree walking transducers
- Salvati
(Show Context)
Citation Context ... be computed from the derivation tree in logspace. Also, if the target-side grammar is linear and string-generating, the target string can be explicitly computed from the derivation tree in logspace (=-=Salvati, 2007-=-). 181 as the sole symbol of rank 2), and turn the grammar into a tree grammar, replacing all instances of string concatenation in the grammar with the tree operation t1, t2↦→ c(t1, t2). This way, a s... |

9 | Problèmes de filtrage et problèmes d’analyse pour les grammaires catégorielles abstraites - Salvati - 2005 |

5 | Uniqueness of normal proofs in implicational intuitionistic logic - Aoto - 1999 |

5 |
Grammars with macrolike productions
- Fisher
- 1968
(Show Context)
Citation Context ...o Datalog is possible for more powerful grammar formalisms with “context-free” derivations, such as (multi-component) tree-adjoining grammars (Joshi and Schabes, 1997; Weir, 1988), IO macro grammars (=-=Fisher, 1968-=-), and (parallel) multiple contextfree grammars (Seki et al., 1991). For instance, the TAG in Figure 3 is represented by the Datalog program in Figure 4. Moreover, the method of reducS A ɛ ANA a A d ... |

3 | and Ryo Yoshinaka. 2005. Lexicalization of second-order ACGs - Kanazawa |

1 | Uniqueness of normal proofs in{→,∧}-fragment of NJ. Research Report IS-RR-94-0024F - Aoto, Ono - 1994 |