Closed krasnoperov closed 4 months ago
The default dataset contains the pattern |fu|
, which (correctly, but undesirably) matches on the -Fu
in Kung-Fu
. There are two potential ways we could fix this issue:
|fu|
pattern entirely, orKung-Fu
and leave the |fu|
pattern untouched.I am leaning toward 2) at the moment: the |fu|
pattern seems useful in general, and I cannot think of any other egregious false positives other than the instance you report. What do you think?
I think that whitelisting Kung-Fu is a good option here. Also, it is possible to handle any future false positives by adding them to the whitelist as they arise.
I released v0.3.1 with the fix (please ignore v0.2.2 and v0.3.0, both of which were problematic due to my botching some release automation—sorry for the noise!). Thanks again for the report.
Expected behavior
matcher.hasMatch('Kung-Fu') returns true
Actual behavior
matcher.hasMatch('Kung-Fu') returns false
Minimal reproducible example
Steps to reproduce
Additional context
No response
Node.js version
v20.15.0
Obscenity version
0.2.1
Priority
Terms