Goal: Extend the NL2DSL grammar engine to handle 95%+ of structured natural language patterns deterministically, without requiring LLM assistance.
Current Status: ~70% coverage of academic benchmark patterns
Target: 95% coverage by Q4 2025
The grammar-based translator uses a multi-stage pipeline:
Natural Language Input
│
▼
┌───────────────────┐
│ Sentence Splitter │ ← Split complex sentences
└───────────────────┘
│
▼
┌───────────────────┐
│ Pattern Matcher │ ← Match against grammar rules
└───────────────────┘
│
▼
┌───────────────────┐
│ Structure Builder │ ← Build DSL AST
└───────────────────┘
│
▼
┌───────────────────┐
│ DSL Serializer │ ← Output DSL text
└───────────────────┘
| Category | Examples | Coverage | Priority |
|---|---|---|---|
| IS-A Relations | "X is a Y", "Every X is a Y" | 95% | Done |
| HAS-A Relations | "X has Y", "X contains Y" | 90% | Done |
| Simple Conditionals | "If X then Y" | 85% | Done |
| Quantifiers | "All X", "Some X", "No X" | 60% | P1 |
| Temporal | "Before X", "After Y", "During Z" | 50% | P1 |
| Comparatives | "X is more than Y", "X is the most Z" | 30% | P2 |
| Nested Conditions | "If X and Y then Z unless W" | 25% | P2 |
// Input "All mammals have a heart" // Parsed structure { quantifier: "universal", variable: "?x", domain: "Mammal", predicate: { op: "has", subject: "?x", object: "heart" } } // Output DSL @r1 Implies (isA ?x Mammal) (has ?x heart)
| Phase | Deliverable | Timeline |
|---|---|---|
| Phase 1 | Universal/existential quantifiers (∀, ∃) | Q1 2025 |
| Phase 2 | Temporal point references | Q1 2025 |
| Phase 3 | Temporal intervals (Allen relations) | Q2 2025 |
| Phase 4 | Comparative structures | Q2 2025 |
| Phase 5 | Nested conditionals with exceptions | Q3 2025 |
| Phase 6 | Edge case hardening, 95% target | Q4 2025 |