/** * Grammar Transformer - Dependency Injection Architecture * * Transforms statements between languages using injected dependencies. * This makes the transformer completely domain-agnostic. */ import type { Dictionary } from '../interfaces/dictionary'; import type { ProfileProvider } from '../interfaces/profile-provider'; /** * Configuration for grammar transformer. */ export interface TransformerConfig { /** Dictionary for keyword translation */ readonly dictionary: Dictionary; /** Profile provider for grammar rules */ readonly profileProvider: ProfileProvider; } /** * Generic grammar transformer using dependency injection. * * @example * const transformer = new GrammarTransformer({ * dictionary: new InMemoryDictionary(translations), * profileProvider: new InMemoryProfileProvider(profiles) * }); * * const japanese = transformer.transform('select name from users', 'en', 'ja'); * // → "users から name を 選択" */ export declare class GrammarTransformer { private dictionary; private profileProvider; constructor(config: TransformerConfig); /** * Transform a statement from one language to another. * * @param input - Statement in source language * @param fromLanguage - Source language code * @param toLanguage - Target language code * @returns Transformed statement in target language * * @throws Error if profiles not found or translation fails */ transform(input: string, fromLanguage: string, toLanguage: string): string; /** * Parse statement into semantic roles. * This is a simplified generic parser - DSLs can provide custom parsers. */ private parseStatement; /** * Translate roles using injected dictionary. * Returns a Map of ParsedElement objects expected by reorderRoles. */ private translateRoles; } //# sourceMappingURL=transformer.d.ts.map