refactor: version 4.0.2 -- Duplicados de Nuevo con IA decididos por la IA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,9 @@ export function keywords(text) {
|
||||
return new Set(words.filter((w) => w.length > 2 && !STOPWORDS.has(w)).map(stem));
|
||||
}
|
||||
|
||||
// Parecido si comparten >= 2 palabras clave y al menos la mitad del conjunto mas chico.
|
||||
export function isSimilar(a, b) {
|
||||
// Cantidad de palabras clave compartidas (filtro amplio previo a la IA).
|
||||
export function sharedCount(a, b) {
|
||||
let shared = 0;
|
||||
for (const w of a) if (b.has(w)) shared += 1;
|
||||
return shared >= 2 && shared / Math.max(1, Math.min(a.size, b.size)) >= 0.5;
|
||||
return shared;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user