A Query Tool for Syntactically Frame Acquisition

Laura KallmeyerEMNLP 2000

Abstract

This paper presents a specialized query tool designed for searching syntactically annotated corpora (treebanks). By translating high-level linguistic queries into optimized SQL, the system enables researchers to identify complex structural patterns—such as dominance and linear precedence—within non-traditional tree structures. The tool leverages relational database technology and pre-computed structural relations to achieve high performance on large-scale treebanks like Verbmobil, bridging the gap between formal linguistic theory and efficient data retrieval.

Introduction

Linguists frequently require natural language examples of specific, rare grammatical constructions to test theoretical frameworks. While traditional tools for searching plain text or part-of-speech (POS) tags are widely available, they often rely on regular expressions (regex). Regex is effective for simple linear sequences but fails to capture hierarchical relationships, such as a noun phrase nested within a verb phrase regardless of intervening tokens.

This challenge is intensified by "discontinuous constituents," where a single phrase is split across a sentence—a common occurrence in languages like German. Furthermore, many modern corpora do not adhere to strict mathematical tree structures, often containing disconnected nodes or multiple roots. This research addresses the need for a tool capable of handling these complex, non-linear structural relationships efficiently.

Methodology: Bridging Linguistics and Relational Databases

The proposed system bridges the gap between formal linguistics and relational database technology through a multi-step translation process:

  1. Query Language: Users define nodes and relationships using a simplified first-order logic. Key operators include immediate dominance (>), ancestor-descendant dominance (>>), and linear precedence (..).
  2. Relational Mapping: The corpus is pre-processed and stored in a MySQL database. The schema utilizes global tables for node and pair classifications and sub-corpus specific tables for tokens and node pairs.
  3. Pre-computation: To ensure high-speed searches, the system pre-calculates the "reflexive transitive closure" of the parent relation. By pre-determining every possible ancestor-descendant relationship, the database avoids expensive recursive searches at runtime.
  4. SQL Translation: A Java-based component compiles linguistic queries into standard SELECT DISTINCT SQL statements, leveraging built-in indexing for maximum speed.
Relational database schema for storing treebank data

Corpus and Implementation

The tool was primarily developed and validated using the Verbmobil corpus, which contains approximately 38,000 tree-like annotation structures from German spoken language (business appointment scheduling). The architecture is designed for adaptability and can be extended to other major corpora, including the Negra Corpus (German), the Penn Treebank (English), and the French Treebank.

Handling Complex Linguistic Structures

A key insight of this work is that specialized graph databases are not strictly necessary for querying trees. By cleverly indexing node pairs and pre-calculating structural relations, standard relational databases can outperform custom search algorithms.

Furthermore, by defining a query model that does not require a unique root or total connectedness, the tool remains functional for complex phenomena like long-distance wh-movement (e.g., "Who do you think Maria loves?"). The system also benefits from query constraints; searching for rare syntactic categories first can effectively "prune" the search space, accelerating subsequent operations.

Syntactic structure of a long-distance wh-movement query

Performance Results

Testing on modest hardware (Pentium II 400MHz) demonstrated the system's efficiency:

  • Structural Search: A query for a specific prepositional phrase modifying an accusative object was completed in 1.46 seconds.
  • Complex Queries: A difficult search for long-distance movement involving multiple clauses and disconnected nodes took 6.43 seconds.
  • Scalability: Even with a database containing over 8 million node pairs, indexing allowed for near-real-time results.

Conclusion and Future Work

While the current system provides a robust framework for syntactic search, several enhancements are planned. Future iterations will support disjunctions (OR operators) and direct queries for specific word tokens. Additionally, the author intends to implement an automatic query optimizer to reorder search terms based on category frequency and a graphical user interface to allow researchers to "draw" the partial trees they wish to locate.

Summary updated

BibTeX
@inproceedings{kallmeyer2000query,
  author = {Laura Kallmeyer},
  title = {{A Query Tool for Syntactically Frame Acquisition}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2000},
  doi = {10.3115/1117794.1117818},
}
Figure