UNPKG

arela

Version:

AI-powered CTO with multi-agent orchestration, code summarization, visual testing (web + mobile) for blazing fast development.

47 lines 1.32 kB
import type { ScoredItem } from "./types.js"; /** * SemanticDeduplicator - Removes semantically similar/duplicate items * * Uses cosine similarity to detect duplicates. When duplicates are found, * keeps the item with the higher score. */ export declare class SemanticDeduplicator { private scorer; private threshold; constructor(threshold?: number); /** * Remove semantically similar items * Keeps highest-scoring item from each duplicate group */ deduplicate(items: ScoredItem[]): ScoredItem[]; /** * Check if item is duplicate of any existing unique items */ private isDuplicate; /** * Extract content from item */ private getContent; /** * Set deduplication threshold */ setThreshold(threshold: number): void; /** * Get current threshold */ getThreshold(): number; /** * Find duplicate groups in items (for debugging/analysis) */ findDuplicateGroups(items: ScoredItem[]): ScoredItem[][]; /** * Get deduplication statistics */ getStats(original: ScoredItem[], deduplicated: ScoredItem[]): { originalCount: number; deduplicatedCount: number; removedCount: number; deduplicationRate: number; }; } //# sourceMappingURL=dedup.d.ts.map