Modular Semantic Grammars for Complex Natural-Language Query Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developing software applications capable of comprehensively interpreting complex natural language queries is challenging due to the variability and richness of human expression, as existing systems struggle to handle variations in date formats and contextual expressions beyond literal values.

Innovation Solution

Implementing a query-processing server that utilizes semantic grammars, which are extensible and modular, allowing developers to create and extend semantic grammars independently, enabling the system to interpret a wide range of natural language expressions through a combination of context-free grammars and semantic rules.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If developers write comprehensive code to interpret all possible natural language expressions, then the system can handle diverse queries, but the development effort and code complexity become extremely difficult

Engineering Contradiction:
Improvecapability to interpret diverse natural language expressionsVSAvoidcode complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments natural language interpretation into separate grammar modules (e.g., DateGrammar, MoneyGrammar, ArithmeticGrammar). Each grammar handles a specific domain or expression type independently, allowing the system to interpret diverse queries without requiring a single monolithic complex codebase. Developers can extend functionality by adding new grammar modules without rewriting existing code.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The QueryProcessor class serves as a universal component that can process multiple types of natural language expressions through different grammar modules. The same QueryProcessor infrastructure handles dates, money, arithmetic, and other expression types, reducing overall system complexity while maintaining versatility.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Measurement precision

If the system is designed to handle complex historical conditions and contextual expressions, then interpretation accuracy improves, but the initial development effort increases considerably

Engineering Contradiction:
Improveinterpretation accuracyVSAvoiddevelopment effort
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The patent implements pre-defined grammar templates for common expression patterns (dates, money, arithmetic). These templates are prepared in advance with built-in logic for handling complex cases like historical dates and contextual expressions. When processing queries, the system matches expressions against these pre-prepared templates, achieving high interpretation accuracy without requiring developers to write custom handling code for each complex scenario.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The grammar modules are designed to be nested and compositional. For example, a DateGrammar can be nested within a QueryGrammar, and both can be nested within the overall system architecture. This nesting allows complex expressions to be built from simpler components, where each level handles specific aspects of interpretation, reducing development effort while maintaining accuracy.

Inventive Principle:
Principle #7Nested doll (Nesting)

3Adaptability or versatility

If semantic grammars are made extensible and modular, then the system can be extended independently without extensive updates, but the initial system architecture becomes more complex

Engineering Contradiction:
ImproveextensibilityVSAvoidsystem architecture complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system architecture is segmented into independent grammar modules (DateGrammar, MoneyGrammar, ArithmeticGrammar) that can be developed, tested, and extended separately. Each module has a clear interface and responsibility, allowing the system to be extended by adding new grammar modules without modifying existing ones. This segmentation achieves extensibility while keeping individual module complexity manageable.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The QueryProcessor acts as an intermediary that coordinates between the user input and multiple grammar modules. It manages the complexity of interacting with multiple grammars by providing a unified interface and processing logic. This mediator pattern allows the system to be extensible without requiring changes to the coordination logic, as new grammars simply integrate through the existing QueryProcessor interface.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12417354B2Using semantic grammar extensibility for collective artificial intelligence
Publication Date: 2025.09.16 SOUNDHOUND AI IP LLC
  • US12417354B2 patent drawing
  • US12417354B2 patent drawing
  • US12417354B2 patent drawing

AI summary

Support for natural language expressions is provided by the use of semantic grammars that describe the structure of expressions in that grammar and that construct the meaning of a corresponding natural language expression. A semantic grammar extension mechanism is provided, which allows one semantic grammar to be used in the place of another semantic grammar. This enriches the expressivity of semantic grammars in a simple, natural, and decoupled manner.