jo3-l / obscenity

Robust, extensible profanity filter for NodeJS
MIT License
82 stars 5 forks source link

request: French language support #57

Closed zcchew1202 closed 4 months ago

zcchew1202 commented 8 months ago

Description

I'm working on a project that requires some french support. I saw https://github.com/darwiin/french-badwords-list/tree/master being adapted for https://github.com/jojoee/leo-profanity and was thinking of doing the same thing. I like how extensible this library is.

Solution

Similar to english.ts, the idea is to import and extract the array from https://github.com/darwiin/french-badwords-list/tree/master and build a dataset. I can work on a PR for it but can someone point me in the right direction for writing a test for this?

Code of Conduct

jo3-l commented 8 months ago

Thank you for raising this and offering to submit a PR; I appreciate it. That said, I admit I am rather hesitant to add 'official' support for languages other than English to Obscenity for two primary reasons:

If you are a native French speaker and are able to both confirm that Obscenity works well for French and maintain the relevant code in the long-term, I would be willing to accept a PR. If you are not, though -- which is perfectly reasonable -- I would prefer to leave support for other languages out of the official project. You can still of course develop such support in your own project, perhaps even released separately on npm if you think it is something others would find useful.

jo3-l commented 4 months ago

Closing for now, but happy to re-open if you (or anyone else) address my previous comment.