/** * Standalone Deduplication Module * * Phase 3: Remove duplicate results from a batch of records. * * This is different from session fingerprinting (Phase 2): * - Session fingerprinting: tracks across multiple queries over time * - This module: dedupes a single batch (e.g., federated search output) * * Deduplication strategy (priority order): * 1. URL matching (primary) - exact match after normalisation * 2. Title similarity (fallback) - Jaccard coefficient threshold * 3. Year proximity - same title within ±N years */ import type { DedupeOptions, DedupeResult, DedupeMatchType } from './types.js'; /** * Normalise a URL for comparison * - Lowercase * - Remove trailing slashes * - Sort query parameters * - Remove fragments */ export declare function normaliseUrl(url: string): string; /** * Normalise title for comparison * - Lowercase * - Remove punctuation * - Collapse whitespace */ export declare function normaliseTitle(title: string): string; /** * Calculate Jaccard similarity between two titles * Returns a value between 0 (completely different) and 1 (identical) */ export declare function titleSimilarity(title1: string, title2: string): number; /** * Check if two records are duplicates */ export declare function areDuplicates(a: Record, b: Record, options?: DedupeOptions): { isDuplicate: boolean; matchType?: DedupeMatchType; }; /** * Deduplicate a batch of records * * @param records - Array of records to deduplicate * @param options - Deduplication options * @returns Deduplication result with unique records and statistics */ export declare function dedupeRecords(records: Record[], options?: DedupeOptions): DedupeResult; //# sourceMappingURL=dedupe.d.ts.map