/** * Fuzzy Matching Utility * * Uses Levenshtein distance for typo tolerance and similarity matching. * Useful for: "Did you mean?" suggestions, typo correction, command aliases. */ import type { FuzzyMatch } from './types.js'; /** * Fuzzy matcher for finding similar strings */ 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 */ isSimilar(str1: string, str2: string, threshold?: number): boolean; /** * Calculate Levenshtein distance (edit distance) between two strings */ levenshteinDistance(a: string, b: string): number; /** * Get similarity score (0-1) between two strings * 1.0 = identical, 0.0 = completely different */ similarityScore(str1: string, str2: string): number; } export declare function fuzzyMatch(query: string, candidates: string[], maxDistance?: number): string[]; export declare function fuzzyScore(str1: string, str2: string): number; export declare function findBestMatch(query: string, candidates: string[]): string | undefined; export { FuzzyMatch }; //# sourceMappingURL=fuzzy-matcher.d.ts.map