Introduction
In computational linguistics, Typed Unification-based Grammars—such as Head-driven Phrase Structure Grammar (HPSG)—are essential for modeling complex linguistic structures. These systems rely on "unification," the process of merging information from different types. Mathematically, for unification to be consistent and efficient, the type hierarchy is typically required to be a Meet-Semi-Lattice (MSL). In an MSL, every pair of types must have a unique "least upper bound" (the most general type that encompasses both).
The Challenge of Real-World Grammars
While the MSL requirement is mathematically convenient, real-world, large-scale grammars rarely satisfy it naturally. To bridge this gap, compilers often perform a "completion" (such as the Dedekind-MacNeille completion) to add missing types. This approach suffers from two critical flaws:
- Complexity: In the worst case, the number of added types can grow exponentially, leading to a "type explosion" that slows down compilation and increases memory usage.
- Debugging Difficulty: Automatically generated types often receive cryptic identifiers (e.g., "Type 452"), making it nearly impossible for grammar designers to diagnose why two types unified into a specific result.
Proposed Methodology: Prime Sets and Conjunctive Naming
The authors propose a more flexible approach that works directly with "near-MSL" hierarchies. Instead of forcing a full completion, they introduce two new mathematical constructions:
- Prime Sets: A set of types where the entire set has a unique join (a common supertype), but no smaller subset of those types does.
- Pseudo-prime Sets: Sets that are consistent (they could share a common supertype) but currently lack a unique join in the user-defined hierarchy.
Algorithmic Analysis
To implement this, the researchers developed an algorithm to identify all prime and pseudo-prime sets within a given grammar. This analysis provides a "spectrum" showing how far a specific grammar deviates from a perfect MSL.
Instead of pre-calculating every possible missing type, the system builds a specialized automaton-based index. During parsing, this state machine tracks unified types. If a set of types matches a known "prime set," the automaton instantly resolves them to the correct result. If no single type exists, the system employs Conjunctive Naming (e.g., a & b & c). This provides immediate, human-readable feedback to the linguist about which types were combined.
Evaluation and Results
The method was evaluated using the English Resource Grammar (ERG) (3,412 types) and Berligram (434 types), tested against the FUSE Corpus of 2,354 sentences.
Key findings include:
- Parsing Performance: The new method is only 5.4% slower than ALE (a fully pre-compiled MSL system) but significantly more flexible. It outperformed the LKB system—which uses on-line caching—by over 40%.
- Compilation Speed: Analyzing the massive ERG to find all prime sets took only 27 seconds, avoiding the catastrophic type explosion seen in other methods.
- Structural Insights: The researchers found that practical linguistic grammars are "almost" MSLs; the largest prime set in the ERG was only size 9. This property ensures that the resulting automata remain compact and manageable (approx. 6,500 states for the ERG).
Conclusion
By shifting from rigid mathematical completion to a flexible structural analysis, the authors provide a framework that balances computational efficiency with developer usability. This approach allows grammar designers to maintain complex, non-MSL hierarchies without sacrificing performance or the ability to debug their systems effectively. Future work may further optimize the automaton by incorporating frequency data to prioritize common unification paths.
Summary updated