/** * Heuristic Matching for Google Search Results * * Stage 4 of the entity resolution pipeline. * Rule-based matching to resolve obvious matches without AI. */ import type { DeferredItem, EntityType, GoogleSearchResult, HeuristicMatch } from './types'; /** * Normalize unicode by removing diacritics/accents. */ export declare function normalizeUnicode(s: string): string; /** * Extract content words from a title, removing filler words and punctuation. */ export declare function extractContentWords(title: string): Set; /** * Get source name from URL. */ export declare function getSource(url: string): string | null; /** * Get canonical (root) URL for a source. */ export declare function getCanonicalUrl(url: string, source: string): string; /** * Result from heuristic matching. */ interface HeuristicMatchResult { /** Matched items */ found: HeuristicMatch[]; /** Items deferred to AI classification */ deferred: DeferredItem[]; } /** * Try to find a heuristic match for search results. * * Returns match if found, null if should defer to AI. */ export declare function tryHeuristicMatch(title: string, category: EntityType, results: GoogleSearchResult[]): HeuristicMatch | null; /** * Apply heuristic matching to multiple search results. * * @param items - Array of items with search results * @returns Found matches and deferred items */ export declare function applyHeuristics(items: Array<{ title: string; category: EntityType; results: GoogleSearchResult[]; author?: string; }>): HeuristicMatchResult; export {}; //# sourceMappingURL=heuristics.d.ts.map