-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Implement Profanity Validator #122
base: main
Are you sure you want to change the base?
Implement Profanity Validator #122
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #122 +/- ##
==========================================
+ Coverage 95.11% 95.54% +0.43%
==========================================
Files 94 96 +2
Lines 1024 1123 +99
==========================================
+ Hits 974 1073 +99
Misses 50 50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
How much size increase the package this change? |
@deandreamatias i don't know the exact size change, but it is just text so it should not be too much. I would prefer a different list per language because they could have different profanity in that language. When setting useAllLocales it would use all of them together. |
@deandreamatias this is ready now. |
@martijn00 for me don't make sense that the validator add profanity words by default. This words could be a few or a lot, depends on app contexts. In another way, this PR add changes of multiple issues on same PR. Also changes something on CI. Split this changes on different PR please |
@deandreamatias please merge the other PR's so i can rebase this one and work on the changes. |
@deandreamatias I've rebased the changes so it should be easier to check this one now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AI needs to have a lot of context in order to generate a list of profane words. Even then, it will probably fail or users will get around the validator.
This sort of thing requires human moderation rather than programming.
'Asesinato', | ||
'asno', | ||
'bastardo', | ||
'Bollera', | ||
'Cabrón', | ||
'Caca', | ||
'Chupada', | ||
'Chupapollas', | ||
'Chupetón', | ||
'concha', | ||
'Concha de tu madre', | ||
'Coño', | ||
'Coprofagía', | ||
'Culo', | ||
'Drogas', | ||
'Esperma', | ||
'Fiesta de salchichas', | ||
'Follador', | ||
'Follar', | ||
'Gilipichis', | ||
'Gilipollas', | ||
'Hacer una paja', | ||
'Haciendo el amor', | ||
'Heroína', | ||
'Hija de puta', | ||
'Hijaputa', | ||
'Hijo de puta', | ||
'Hijoputa', | ||
'Idiota', | ||
'Imbécil', | ||
'infierno', | ||
'Jilipollas', | ||
'Kapullo', | ||
'Lameculos', | ||
'Maciza', | ||
'Macizorra', | ||
'maldito', | ||
'Mamada', | ||
'Marica', | ||
'Maricón', | ||
'Mariconazo', | ||
'martillo', | ||
'Mierda', | ||
'Nazi', | ||
'Orina', | ||
'Pedo', | ||
'Pendejo', | ||
'Pervertido', | ||
'Pezón', | ||
'Pinche', | ||
'Pis', | ||
'Prostituta', | ||
'Puta', | ||
'Racista', | ||
'Ramera', | ||
'Sádico', | ||
'Semen', | ||
'Sexo', | ||
'Sexo oral', | ||
'Soplagaitas', | ||
'Soplapollas', | ||
'Tetas grandes', | ||
'Tía buena', | ||
'Travesti', | ||
'Trio', | ||
'Verga', | ||
'vete a la mierda', | ||
'Vulva' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of contexts in which these words have no profane sense.
I see no point in having a default word list.
Having these words as a base will not save time for the developer who wants to make a quality or meaningful filter.
class ProfanityValidator extends BaseValidator<String> { | ||
/// Constructor for the profanity validator. | ||
ProfanityValidator({ | ||
List<String>? profanityList, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can make this required and remove the translated list of Profanity words
Connection with issue(s)
Close #121
Close #113
Solution description
Screenshots or Videos
To Do