You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest you include a list of regexes to match cases such as this.
An alternative would be to collapse all repeated characters before matching, although this would have an issue with any profanities that contain repeated characters that are no longer profane once collapsed.
The text was updated successfully, but these errors were encountered:
Completely agree with you on this. Tackling this is already in the list of TODOs on the README:
[TODO] All words that have the same character repeated more than twice in a row are removed (e.g. poooop -> poop)
NOTE: This is obviously not a perfect approach, as words like fuuck wouldn't be detected, but it's better than nothing.
I think one of the solutions could be to only allow specific characters to be repeated twice, such as o (e.g. poop) and t (e.g. letter), but collapse letters that aren't usually repeated into a single letter, like i (e.g. shiit) or u (e.g. fuuck).
I'm not sure regex is the best solution for this either, because Golang's Regex is known for not being the fastest, but it would be good to check what the performance difference is between multiple strings.Replace(...) and a single regex.
Anyways, thanks for creating an issue for this.
I can't promise when I'll be able to tackle the issue, but if you want to give it a try, you're welcome to :)
The program
prints
I suggest you include a list of regexes to match cases such as this.
An alternative would be to collapse all repeated characters before matching, although this would have an issue with any profanities that contain repeated characters that are no longer profane once collapsed.
The text was updated successfully, but these errors were encountered: