/** * Fuzzy matching — Levenshtein distance and similarity scoring * for catching typos and creative misspellings. */ /** * Compute Levenshtein edit distance between two strings. * Uses optimized single-row DP approach. */ export declare function levenshtein(a: string, b: string): number; /** * Compute similarity ratio between two strings (0-1). * 1 = identical, 0 = completely different. */ export declare function similarity(a: string, b: string): number; /** * Quick pre-filter: can these two strings possibly meet the threshold? * Avoids expensive Levenshtein calculation for obviously different strings. */ export declare function canMatch(a: string, b: string, threshold: number): boolean; /** * Find the best fuzzy match for a word in a set of candidates. * Returns the match and its confidence, or null if nothing meets threshold. */ export declare function bestFuzzyMatch(word: string, candidates: string[], threshold: number): { match: string; confidence: number; } | null;