A Practical Comparison of Parsing Strategies

Jonathan SlocumACL 1981

Introduction

In the early 1980s, the field of computational linguistics was heavily influenced by theoretical computer science, which categorized parsing strategies based on their worst-case time and space requirements (e.g., $O(n^3)$). However, Jonathan Slocum’s research challenges this reliance on theoretical bounds, arguing that they rarely reflect the reality of processing human language. This paper presents an empirical, comparative analysis of parsing performance, seeking to transform parser selection from an "art form" into an empirical science based on real-world production settings like Machine Translation (MT) and database interfaces.

The Empirical Gap

The primary problem addressed is the lack of comparative data for practitioners. While a theorist might focus on an arbitrary grammar's performance on a worst-case string, a practitioner needs to know which parser handles a 10-word English sentence fastest within a specific environment—such as a LISP system with limited memory. Slocum argues that the "constants" ignored by theoretical models—storage management, garbage collection, paging, and rule-body procedures—actually dominate the total runtime in practice.

Experimental Methodology

The author conducted two major sets of experiments to evaluate various parsing strategies:

  1. The SRI Experiments: These compared three distinct parsers: LIFER (a top-down, depth-first parser), DIAMOND (an all-paths bottom-up CKY parser augmented with an "oracle" to prune rules), and a standard, "startlingly simple" CKY implementation.
  2. The LRC Experiments: Conducted at the Linguistics Research Center (UT Austin), these compared CKY against a Left-Corner Parser (LCP). The experiments also tested strategy variations, including Top-Down Filtering (using context to prune bottom-up proposals) and Early Constituent Tests (evaluating rule constraints as soon as a partial match is found).

Datasets

Performance was measured using two primary benchmarks:

  • LADDER Benchmark: 249 English sentences (averaging 7.82 words) paired with both domain-specific "Semantic Grammars" and general "Linguistic Grammars."
  • LRC German Corpus: 262 German sentences (averaging 15.6 words) from technical manuals, representing a broader range of linguistic phenomena than the SRI set.

Key Insights: The "Optimization Trap"

A central finding of the research is the "Optimization Trap." Sophisticated optimizations, such as DIAMOND’s oracle or Early Constituent Tests, often introduced more computational overhead in terms of function calls and bookkeeping than the time they saved by pruning the search space.

Linear Performance in Practice

While theoretical parsing is $O(n^3)$, Slocum found that in practice, average parse times for the tested grammars appeared to be linear relative to sentence length. This suggests that the complexity of natural language, as expressed in these grammars, does not trigger the worst-case scenarios predicted by theory.

The Break-Even Point

The effectiveness of strategies like top-down filtering depends heavily on sentence length. Filtering was found to be detrimental for short sentences (under 7 words) due to the overhead of the filtering mechanism itself. However, it became beneficial as sentences grew longer, eventually reducing overall analysis time by 17% on the German corpus by preventing the evaluation of expensive semantic rules.

Key Results

  • Simplicity Wins: In the SRI tests, the simple CKY parser was significantly faster than both LIFER and the "optimized" DIAMOND, despite CKY proposing more total phrases.
  • LCP vs. CKY: In the LRC experiments, the Left-Corner Parser (LCP) was roughly 7% faster than CKY overall. However, CKY was remarkably more memory-efficient, requiring 84% fewer CONS cells than the LCP in matched trials.
  • Filtering Gains: Despite increasing the "pure" parse time by 58%, top-down filtering reduced the total analysis time for long sentences because it drastically reduced the time spent on expensive feature-rule evaluations.

Limitations and Future Work

The results are inherently tied to the INTERLISP environment and the DEC KL-10/2060 hardware of the era. Different programming styles or memory management schemes could shift these results. Furthermore, the effectiveness of optimizations like "Early Constituent Tests" is highly dependent on how linguists structure their grammar rules. Slocum concludes that the search for an optimal parser must focus on the specific interaction between the parsing algorithm and the linguistic theories it is intended to support.

Summary updated

BibTeX
@inproceedings{slocum1981practical,
  author = {Jonathan Slocum},
  title = {{A Practical Comparison of Parsing Strategies}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {1981},
  doi = {10.3115/981923.981925},
}
Figure