/** * Fuzzy matching utility for typo tolerance * Uses Levenshtein distance algorithm to find similar strings * Adapted from Photon's implementation */ export interface FuzzyMatch { text: string; distance: number; } /** * Fuzzy matcher for finding similar strings * Useful for: "Did you mean?" suggestions, typo correction, command aliases */ export declare class FuzzyMatcher { /** * Find similar matches for a query string * Returns matches sorted by similarity (lowest distance first) */ findSuggestions(query: string, candidates: string[], maxDistance?: number): string[]; /** * Get the best single match for a query */ findBestMatch(query: string, candidates: string[]): string | undefined; /** * Check if two strings are similar enough (for aliasing) */ isSimilar(str1: string, str2: string, threshold?: number): boolean; /** * Calculate Levenshtein distance (edit distance) between two strings * Measures minimum edits (insert, delete, substitute) needed to transform one string into another */ private levenshteinDistance; /** * Get similarity score (0-1) between two strings * 1.0 = identical, 0.0 = completely different */ similarityScore(str1: string, str2: string): number; } //# sourceMappingURL=fuzzy-matcher.d.ts.map