Comments (2)
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:
-
The library was designed with English in mind, and I am not sure how nicely some of its foundations generalize to other languages. In particular, I am skeptical as to whether the current system (character-based transformations, plus a carefully curated set of patterns) for detecting variants of terms will remain effective. For your request in particular, this is less of an issue because English and French are somewhat closely related. But the more pressing issue is:
-
I only personally speak English fluently, which means I can only attest to the quality of patterns for profanity in English. So while I could in theory accept an initial PR for a new French preset based on an existing dataset, it would be difficult to maintain that myself going forward. If, for instance, I later receive a bug report that phrase X is being erroneously marked as profanity by pattern Y in French, it would be exceedingly difficult to evaluate this report and to release a satisfactory fix on my own.
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.
from obscenity.
Closing for now, but happy to re-open if you (or anyone else) address my previous comment.
from obscenity.
Related Issues (15)
- Dependency Dashboard
- Question around performance HOT 2
- bug: Unable to ban numbers HOT 6
- bug: Memory leak when using an empty string HOT 2
- Incorrect docs for skipNonAlphabeticTransformer HOT 1
- Fix Typescript Types when using NodeNext module resolution HOT 1
- bug: Certain words not being censored HOT 6
- request: Censor the word "shit" HOT 2
- bug: Censoring of the n-word results in more asterisks than expected HOT 2
- bug: Strange input results in false positive HOT 2
- bug: Using .addPhrase with Angular script optimization causes error that prevents Angular from bootstrapping HOT 1
- Package obscenity has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" HOT 2
- bug: Kung Fu false positive HOT 3
- If the obscene word is at the beginning the censoring is not recovered HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obscenity.