A poster tag of 4+ words may share one with the stem
"German Board - [Usenet4ever.info] und [SecretUsenet.com] - "21.Jump.Street.2012.BDRip.AC3.German.XviD-POE.part01.rar"": "German" in the stem made the tag a name, and the poster's readable uploads were releases of 1,422 and 1,535 files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfd29c8de3
commit
62250081ef
3 files changed
+16
-4
No files matched your search
@@ -244,15 +244,20 @@ export function isPosterTag(remainder: string, stem: string): boolean {
|
||||
const whole = new Set(words.split(' '))
|
||||
// A per-post id, also inside a word ("FTD772544").
|
||||
if (/\d{5,}/.test(remainder)) return false
|
||||
let significant = 0
|
||||
let shared = 0
|
||||
for (const word of remainder.toLowerCase().split(/[^a-z0-9]+/)) {
|
||||
if (/^\d+$/.test(word)) {
|
||||
if (word.length >= 2 && whole.has(word)) return false
|
||||
continue
|
||||
}
|
||||
if (word.length < 3 || TAG_WORDS.has(word)) continue
|
||||
if (word.length >= 4 ? compact.includes(word) : whole.has(word)) return false
|
||||
significant++
|
||||
if (word.length >= 4 ? compact.includes(word) : whole.has(word)) shared++
|
||||
}
|
||||
return true
|
||||
// A tag of 4+ words may share one with the stem ("German Board - [Usenet4ever.info] und [SecretUsenet.com] -
|
||||
// "21.Jump.Street.2012.BDRip.AC3.German.XviD-POE.part01.rar"": the poster's uploads were releases of 1,535 files).
|
||||
return shared === 0 || (shared === 1 && significant >= 4)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user