raymondjavaxx / swearjar-node

Profanity detection and filtering library.
MIT License
73 stars 33 forks source link

spaces between badwords pass #13

Open Leahelisabeth opened 7 years ago

Leahelisabeth commented 7 years ago

example "e f f w o r d"

Leahelisabeth commented 7 years ago

also can anyone contribute to your dictionary? I work on a childrens website and want to use this but I have a lot of bad words i would like to contribute to your json file first.

loctn commented 7 years ago

@Leahelisabeth looks like the algorithm is based on case-insensitive string equality. It gets complicated if you want to account for all the other $hit people could type 😄. Though if one really wanted to accept a small number of false positives, an algorithm that scans a spaceless version of text would work, albeit a good (maybe acceptable) amount slower.