cleanifix
Version:
Intelligent data cleaning CLI with natural language support - Docker-powered Python engine
62 lines • 1.64 kB
TypeScript
/**
* Natural language command parser for Cleanifix CLI.
* Converts user-friendly commands into structured operations.
*/
export interface ParsedCommand {
command: string;
operation?: string;
targets?: string[];
options?: Record<string, any>;
confidence: number;
}
export interface CommandPattern {
pattern: RegExp;
handler: (match: RegExpMatchArray) => Partial<ParsedCommand>;
examples: string[];
}
export declare class NaturalLanguageParser {
private commandPatterns;
constructor();
/**
* Parse a natural language command into structured format
*/
parse(input: string): ParsedCommand;
/**
* Initialize command patterns
*/
private initializePatterns;
/**
* Normalize input for better pattern matching
*/
private normalizeInput;
/**
* Map analysis type from natural language
*/
private mapAnalysisType;
/**
* Map cleaning type from natural language
*/
private mapCleaningType;
/**
* Calculate confidence score for a match
*/
private calculateConfidence;
/**
* Calculate similarity between two strings
*/
private calculateSimilarity;
/**
* Extract basic intent when no pattern matches
*/
private extractBasicIntent;
/**
* Get suggestions for incomplete commands
*/
getSuggestions(partialInput: string): string[];
/**
* Get all available command examples
*/
getExamples(): Record<string, string[]>;
}
export declare const naturalLanguageParser: NaturalLanguageParser;
//# sourceMappingURL=natural-language.d.ts.map