Corpus-Based Grammar Specialization

Nicola Cancedda, Christer SamuelssonCoNLL/LLL 2000

Abstract

Broad-coverage linguistic grammars, while comprehensive, often suffer from excessive overgeneration and ambiguity when applied to specific domains. This paper presents a method for grammar specialization that treats the task as a global optimization problem. By utilizing a "folded treebank" representation, the authors efficiently prune rule combinations that lead to spurious parses, significantly enhancing precision and parsing speed without sacrificing critical coverage.

Introduction: The Challenge of Broad-Coverage Grammars

In computational linguistics, broad-coverage grammars are designed to handle the vast structural variety of natural language. However, this breadth comes at a cost: overgeneration. For any given sentence, a broad grammar may produce thousands of possible structural interpretations (parses), most of which are nonsensical in a specific context.

For systems operating in restricted domains—such as technical documentation—this complexity is unnecessary and detrimental. The goal is to create a specialized grammar that is leaner, faster, and less ambiguous. Unlike previous manual or local statistical approaches, this research introduces an automated, robust method to find the optimal balance between a grammar's coverage and its ambiguity.

Methodology

The specialization process is framed as a global optimization task, starting with a broad Lexical Functional Grammar (LFG) and "unfolding" its rules to create more specific "chunks."

1. The Objective Function

To evaluate candidate grammars, the authors define a scoring function: $$Score_G = \lambda_{corr} Corr_G - \lambda_{inc} Inc_G - \lambda_{size} Size_G$$ Where:

  • $Corr$ represents the number of correct parses preserved.
  • $Inc$ represents the number of incorrect (spurious) parses allowed.
  • $Size$ is the total size of the grammar, used as a regularization term to prevent overfitting.

By tuning the weights ($\lambda$), the system can be adjusted for varying degrees of pruning aggressiveness.

2. Rule Unfolding

The core mechanism for specialization is "unfolding," which merges sequences of rules into more specific combinations. This allows the system to capture domain-specific linguistic patterns.

Figure 3: Downward and upward unfolding processes used to specialize grammar rules by creating more specific rule combinations.

3. The Folded Treebank

The primary technical innovation is the folded treebank. Traditional grammar evaluation requires re-parsing the entire dataset for every rule change, which is computationally prohibitive. The authors solve this by "folding" all possible parse trees from the training set onto a bipartite graph representing the grammar.

Figure 6: The folded treebank representation, showing how parse trees (left) are mapped onto the grammar's graph structure (right) to enable rapid evaluation.

This mapping allows the system to determine if a rule modification will suppress a specific parse tree in linear time, making the global optimization process feasible.

Experimental Evaluation

The method was tested using a broad-coverage French LFG grammar and a corpus of 960 sentences from technical documentation. A reference treebank was used, where "correct" analyses were manually identified among all possible parses.

Key Results

  • Ambiguity Reduction: Average parses per sentence dropped from 1,941 to just 63.
  • Parsing Speed: Basic "first-order" pruning resulted in a 4x speedup.
  • Accuracy: At its most aggressive setting, the specialized grammar maintained 82.5% coverage of correct parses while boosting the F-score from 35.15 to 54.46.

Conclusion

While the current experiments were conducted on a relatively small dataset, the results demonstrate the power of global optimization for grammar specialization. Future work may explore more sophisticated search algorithms, such as simulated annealing, and evaluate the method's scalability to larger, more diverse corpora. The requirement for a representative domain treebank remains a key factor for successful application.

Summary updated

BibTeX
@inproceedings{cancedda2000corpus,
  author = {Nicola Cancedda and Christer Samuelsson},
  title = {{Corpus-Based Grammar Specialization}},
  booktitle = {CoNLL/LLL},
  year = {2000},
  url = {https://openreview.net/forum?id=u10BrJNE57},
}
Figure