import type { Database } from 'better-sqlite3'; /** * Standard Levenshtein distance algorithm. * Calculates the minimum number of single-character edits required to change one word into the other. */ export declare function levenshteinDistance(a: string, b: string): number; /** * Builds a vocabulary for fuzzy matching consisting of tag names and entry types. * This represents the core ontology of the journal and provides high-value corrections. */ export declare function buildVocabulary(db: Database): string[]; /** * Finds matches within the given maxDistance. */ export declare function findFuzzyMatches(token: string, vocabulary: string[], maxDistance?: number): { match: string; distance: number; }[]; /** * Expands a query by checking each token against the vocabulary. */ export declare function expandFuzzyQuery(query: string, vocabulary: string[], autoCorrect?: boolean): { expanded: string; suggestions: string[]; corrected: boolean; }; //# sourceMappingURL=fuzzy-matcher.d.ts.map