banbuilder icon indicating copy to clipboard operation
banbuilder copied to clipboard

Whole words instead of part.

Open cyberomin opened this issue 11 years ago • 5 comments

Filter should take whole words into consideration as opposed to part of a text. For instance - "document" flags a cuss/swear word. Part of it contains "cum".

cyberomin avatar Feb 23 '15 08:02 cyberomin

+1

TruDan avatar Apr 14 '15 15:04 TruDan

Added a pull request with the changes.

dokinoki avatar May 06 '15 16:05 dokinoki

How can I use this now? I don't seem to find it, the wholeword adding?

bramvanhautte avatar May 21 '18 12:05 bramvanhautte

@BramCoding when calling the function $censor->censorString($terms); there's a second parameter by default is false, set it to true to use fullWords:

$censor->censorString($terms, true);

sergiolch avatar May 21 '18 15:05 sergiolch

The problem with setting true to use fullWords is that it then stops trying to find creative words...

Example: F*** is in the dictionary but F***ing isn't. That means that even basic swear words are not detected.

The built-in dictionaries are lacking when you use fullWords.

rbrlortie avatar Jun 07 '18 21:06 rbrlortie