Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContainsProfanity and DetectAllProfanity mismatch #16

Open
AbhishekTripathi opened this issue Jan 26, 2021 · 1 comment
Open

ContainsProfanity and DetectAllProfanity mismatch #16

AbhishekTripathi opened this issue Jan 26, 2021 · 1 comment

Comments

@AbhishekTripathi
Copy link

Have a look at the following snippet from linqpad. Why is profanity detected when the ContainsProfanity returns false? Seems to be a bug.

var text = "I am swearing by God's name";
var filter = new ProfanityFilter.ProfanityFilter();
filter.ContainsProfanity(text).Dump(); //returns false
filter.DetectAllProfanities(text, true).Dump() //returns god
@AbhishekTripathi
Copy link
Author

Another one for a reverse scenario. Here the ContainsProfanity returns True but DetectAllProfanities returns empty array.

var filter = new ProfanityFilter.ProfanityFilter();
var text = "Have we discussed";
filter.ContainsProfanity(text).Dump(); //returns True
filter.DetectAllProfanities(text).Dump(); // returns empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant