/** * Matching utilities for IAB taxonomy mapping */ export interface IAB2Item { code: string; label: string; } export interface IAB3Item { id: string; label: string; path?: string[]; scd?: boolean; } export type SynonymsMap = Record; /** * Build alias index from IAB 2.x catalog and synonyms */ export declare function buildAliasIndex(catalog: IAB2Item[], synonyms: SynonymsMap): Map; /** * Build label maps from IAB 3.x catalog and synonyms */ export declare function buildLabelMaps(iab3: IAB3Item[], synonyms3x: SynonymsMap): { labels: string[]; labelToId: Map; }; /** * Fuzzy multi-match using rapidfuzz-like scoring */ export declare function fuzzyMulti(query: string, choices: string[], topK?: number, cut?: number): Array<[string, number]>; /** * Simple TF-IDF based retrieval */ export declare class TFIDFIndex { private texts; private vocabulary; private idf; private docVectors; constructor(texts: string[]); private tokenize; private build; private cosineSimilarity; search(query: string, topK?: number, cut?: number): Array<[string, number]>; }