Compilation of Unification Grammars with Compositional Semantics to Speech Recognition Packages

Johan BosCOLING 2002

TL;DR

This paper presents UNIANCE, a compiler that translates linguistic unification grammars (UGs) with rich compositional semantics into speech recognition packages. This allows for the direct generation of domain-independent logical forms from speech, bypassing the need for separate parsing steps and significantly reducing computational overhead.

What Problem Does This Paper Address?

Speech recognition systems typically rely on statistical language models, which are expensive to produce and require large datasets. Linguistically motivated grammars, like unification grammars (UGs), offer a more structured and maintainable approach, but integrating their rich semantic representations into the finite-state machine (FSM) based language models used by speech recognizers presents significant challenges. Specifically, UGs often use feature unification and left-recursion, features not directly supported by standard FSM formats like Nuance's Grammar Specification Language (GSL). This paper addresses the problem of compiling UGs with compositional semantics into GSL, ensuring that the generated speech recognition models can produce logical forms directly and efficiently.

Methods

The UNIANCE compiler employs a pipeline of components to transform UGs into GSL:

  • Feature Instantiation: This step creates a context-free grammar (CFG) backbone by instantiating features with their possible values, ignoring the semantic feature for now.
  • Left Recursion Elimination: A standard algorithm is used to transform left-recursive rules into equivalent right-recursive ones, a requirement for GSL. Crucially, this process is extended to handle the semantic components, ensuring that the meaning representations remain logically equivalent. Two specific rules, LR Elimination Rule I and II, are detailed for this purpose, with Rule II employing lambda abstraction to maintain semantic equivalence.
  • Redundancy Elimination: This component removes productions that are either redundant (e.g., RHS categories not appearing in any LHS) or violate grammar constraints, aiming to simplify the grammar.
  • Packing and Compression: Rules with shared left-hand sides are packed together, and similar productions are compressed into single ones. This aims to reduce the number of derivations and potentially boost recognition speed.
  • Semantic Annotation and GSL Output: The final stage converts the processed UG rules into GSL format. Semantic representations are handled using GSL's slot-filling mechanism, with variables prefixed by '$' and Nuance's strcat function used to construct semantic expressions.

Datasets

The paper describes testing UNIANCE on a medium-sized English unification grammar with 1238 lexical rules and 80 grammar rules. The resulting GSL grammar was compiled into a speech recognition package and tested on a corpus of 131 utterances from 12 different speakers, specifically route instructions given to a mobile robot. This corpus is referred to as the IBL corpus. No new benchmarks were introduced; existing data was used for evaluation.

Key Insights and Ideas

  • Bridging the Gap: The core insight is that it's feasible to compile rich linguistic grammars with compositional semantics into the FSM-based models used by speech recognizers, overcoming limitations like left-recursion and feature unification.
  • Preserving Semantics: A key challenge and achievement is the method for eliminating left-recursion while preserving the compositional semantics. The use of lambda abstraction in LR Elimination Rule II is a clever way to ensure that semantic values are correctly bound, even after structural transformations.
  • Efficiency Gains: Compressing grammar rules (packing and compression) is shown to be beneficial, not only reducing the grammar size but also potentially speeding up recognition.
  • Negligible Overhead: The most significant finding is that incorporating semantic representations into the speech recognition process does not introduce substantial computational overhead, making it practical to obtain logical forms directly from speech.

Key Results

  • The UNIANCE compiler successfully transformed a unification grammar into a GSL grammar.
  • The compiled GSL grammar, when used with Nuance speech recognition software, yielded an average recognition speed of 0.919xRT and a word error rate (WER) of 38.70% on the test corpus.
  • A comparison showed that a grammar without rule compression had a slightly slower recognition speed (1.017xRT) and a higher WER (39.13%).
  • Crucially, generating a grammar without semantic features resulted in virtually identical performance (0.921xRT speed, 38.70% WER), demonstrating that the semantic compilation process itself does not impose a significant computational burden.

Limitations and Future Work

  • Limitations:
    • The current version of the compiler only considers immediate cases of left recursion.
  • The grammar transformation does not handle empty productions (ε-productions) in the input UG, though a standard method for their elimination is noted.
  • The system is tested on a specific type of linguistic grammar (UG) and a particular speech recognition engine (Nuance).
  • The test corpus had a significant portion (44%) not covered by the grammar, leading to a higher WER than might be expected for fully covered data.
  • Future Work:
    • Address empty productions in input UGs.
  • Incorporate handling of non-immediate left-recursion and complex feature values.
  • Explore hybrid language modeling approaches combining grammar-based and statistically-based methods.
  • Investigate alternative left-recursion elimination algorithms, such as Moore's algorithm, which is claimed to produce more compact grammars.

Summary updated

BibTeX
@inproceedings{bos2002compilation,
  author = {Johan Bos},
  title = {{Compilation of Unification Grammars with Compositional Semantics to Speech Recognition Packages}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2002},
}
Figure