Filter only the exact words #38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
We need to filter out only the exact words provided in the profanities list.
Eg: fr -> con is a profane word. It should be filter if it is an exact word. 'contactes' should not be filtered.
Is there a way can do this? I don't want to use falsepositvies because we are maintaining multiple languages.
Please suggest
What do you see?
No response
What do you expect to see?
No response
List the steps that must be taken to reproduce this issue
We need to filter out only the exact words provided in the profanities list.
Eg: fr -> con is a profane word. It should be filter if it is an exact word. 'contactes' should not be filtered.
Is there a way can do this? I don't want to use falsepositvies because we are maintaining multiple languages.
Please suggest
Version
No response
Additional information
No response
Have you tried using
WithSanitizeSpaces(false)?Hi @TwiN
Yes I tried using WithSanitizeSapces(false) -> it removes the spaces in the the string. But still it is not working.
I tried modifying the code but not able. The thing is instead of doing substring search, I need to search for exact word.
Ah you're right, yeah. We'd need to add a new
WithExactWord(bool)featureI got this with the below code