Parsiug in the Absence of a Complete Lexicon

Jim Davidson, S. Jerrold Kaplan

TL;DR

This paper introduces a novel approach to natural language parsing for database query systems by delaying lexical ambiguity resolution until the entire parse is complete. This "late binding" strategy significantly reduces the computational burden and improves accuracy by leveraging semantic grammar and a cost-based disambiguation process, making it more practical for large, dynamic databases.

What Problem Does This Paper Address?

Building natural language interfaces (NLIs) for large or frequently changing databases presents a significant challenge: maintaining a comprehensive lexicon. Traditional parsers rely on extensive dictionaries to understand words and their meanings. However, for databases with millions of entries (like ship names or product catalogs), duplicating this information in a fixed, in-core lexicon is impractical due to redundancy, storage limitations, and the difficulty of keeping it synchronized with the database. This leads to a problem: how does a parser handle words it doesn't recognize, especially when those words are crucial for understanding a user's query? Existing solutions, like immediate database lookups, user interaction, or simple contextual assumptions, are often too slow, inconvenient, or inaccurate.

Methods

The core innovation is a "late binding" approach to lexical ambiguity. Instead of trying to identify the meaning of an unknown word immediately, the parser first generates all possible parses by allowing the unknown word to fit into any grammatical category that would complete a parse. This is facilitated by using a semantic grammar, where grammar rules directly map to concepts and actions within the database domain, thus tightly constraining the possibilities.

Once all syntactically valid parses are generated, a disambiguation process begins. This process prioritizes resolving ambiguities based on a cost model:

  1. Least Expensive: Checking indexed or hashed fields in the database.
  2. Moderate: Making an assumption if only one interpretation remains.
  3. Most Expensive: Asking the user for clarification.

Disambiguated lexical items are temporarily added to an in-core lexicon to speed up future queries, and are eventually dropped if not referenced for a period.

Datasets

Not discussed in the paper. The paper focuses on a general methodology and uses an example from the Knowledge Base Management Systems (KBMS) project testbed, which interfaces with a CODASYL database in the merchant shipping domain.

Key Insights and Ideas

  • Deferring Decisions is Key: The most significant insight is that delaying lexical disambiguation until the full parse is complete dramatically simplifies the problem. It allows the parser to leverage the structure of the entire sentence and the constraints of the semantic grammar to eliminate many incorrect interpretations early on.
  • Semantic Grammar as a Constraint: Semantic grammars are crucial. By mapping grammar rules directly to domain concepts (like SHIPS or PORTS), they inherently limit the possible interpretations of unknown words, making the disambiguation process more efficient.
  • Cost-Based Disambiguation: A pragmatic, cost-aware approach to resolving remaining ambiguities is essential. Prioritizing database lookups over user interaction balances efficiency and accuracy.
  • Dynamic Lexicon Management: Temporarily caching disambiguated terms in an in-core lexicon is a smart optimization for repeated queries, balancing memory usage with performance gains.

Key Results

The paper doesn't present quantitative results in terms of accuracy metrics or speedup percentages. Instead, it demonstrates the effectiveness of the approach through a detailed example:

  • Example: For the query "is izmir in italy?", the parser initially considers "izmir" as a SHIP, PORT, or CARGO. After completing the parse, CARGO is eliminated as it doesn't lead to a valid parse. Then, it checks the database for IZMIR as a SHIP (indexed, faster check). Finding it not there, it defaults to PORT (less indexed, slower check) as the most plausible remaining option. This leads to the query "For the PORTS with Portname equal to IZMIR, is the Portcountry equal to IT?".
  • Qualitative Benefit: The method effectively handles unknown terms by finding plausible interpretations without requiring a pre-existing, exhaustive lexicon. It also allows for the generation of simplified paraphrases of the generated queries, helping users understand how their input was interpreted.

Limitations and Future Work

  • Semantic Grammar Dependency: The method is most effective with semantic grammars. While applicable to syntactic grammars, it becomes more complex and requires additional semantic compatibility checks.
  • Spelling Corrector Conflict: The approach is incompatible with traditional INTERLISP-style spelling correctors, which rely on a complete in-core lexicon.
  • Ambiguity with Existing Meanings: If an unknown term coincidentally matches an existing, well-defined term in the lexicon (e.g., "City of Istanbul" as a city vs. a ship), the system might incorrectly favor the existing meaning. However, the authors note that semantic grammar helps mitigate this by reducing genuinely ambiguous cases.
  • Future Work: The authors suggest extensions where parsing and query processing can be combined. For simple queries, the system could fetch the answer while verifying the classification of an unknown term (e.g., finding the cargo of a ship while confirming the word is a ship). They also note that the technique of collecting all parses could inform users about potential grammar rule deficiencies or missing database items.

Summary updated

BibTeX
@inproceedings{davidson1980parsiug,
  author = {Jim Davidson and S. Jerrold Kaplan},
  title = {{Parsiug in the Absence of a Complete Lexicon}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {1980},
  doi = {10.3115/981436.981468},
}
Figure