Skip to content

Commit e96b3f3

Browse files
committed
Must be at least two overlapping words.
1 parent 44325e8 commit e96b3f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/org/[orgid]/processes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@
298298
process.title
299299
.toLowerCase()
300300
.split(/\W+/)
301-
.slice(1) // Skip the first word, which is usually a verb, and not revealing of the topic
302301
.filter((w) => w.length > 3 && !StopWords.includes(w))
303302
.toSorted()
304303
)
@@ -313,8 +312,9 @@
313312
const common = processWords[a].words.filter((word) => processWords[b].words.includes(word));
314313
// If >=75% of the words are in common, count as a duplicate.
315314
if (
315+
common.length > 2 &&
316316
common.length / Math.min(processWords[a].words.length, processWords[b].words.length) >=
317-
0.75
317+
0.75
318318
) {
319319
// See if we already have this combination of processes
320320
const existing = duplicates.find((d) => d.words.join(',') === common.join(','));

0 commit comments

Comments
 (0)