vandie / isProfanity

A profanity checker which, unlike alternatives, uses the Wagner–Fischer algorithm in order to catch variations that you haven't thought of.
MIT License
12 stars 4 forks source link

Picking up so many clean words #6

Open tgreco opened 6 years ago

tgreco commented 6 years ago

I'm using the word bongo and it's failing for the word homo, with a sensitivity of 0.01.

var isprofanity = require("isprofanity")

isprofanity('bongo', function(t, blocked) { console.log(t) console.log(blocked[0]) }, 0.01);


My solution:

isprofanity('bongo', function(t, blocked) { if(blocked[0].sureness > 0.66) { console.log("True"); }

else 
{
    console.log(blocked[0]);
    console.log("False")
}

}, 0.25);

vandie commented 6 years ago

@tgreco, There is an option to set your minimum sureness rating to block. Take a look at the docs, I never did quite find the perfect rating. someone always found somthing that shouldn't be blocked or shouldn't be. you're best tweaking it for your own personal usage.

also a sensativity of 0.01 means that it requires a sureness of 0.01 or higher...