bekindprofanityfilter 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CONTRIBUTORS.md +106 -0
  2. package/LICENSE +22 -0
  3. package/README.md +1015 -0
  4. package/allprofanity.config.example.json +35 -0
  5. package/bin/init.js +49 -0
  6. package/config.schema.json +163 -0
  7. package/dist/algos/aho-corasick.d.ts +75 -0
  8. package/dist/algos/aho-corasick.js +238 -0
  9. package/dist/algos/aho-corasick.js.map +1 -0
  10. package/dist/algos/bloom-filter.d.ts +103 -0
  11. package/dist/algos/bloom-filter.js +208 -0
  12. package/dist/algos/bloom-filter.js.map +1 -0
  13. package/dist/algos/context-patterns.d.ts +102 -0
  14. package/dist/algos/context-patterns.js +484 -0
  15. package/dist/algos/context-patterns.js.map +1 -0
  16. package/dist/index.d.ts +1332 -0
  17. package/dist/index.js +2631 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/innocence-scoring.d.ts +23 -0
  20. package/dist/innocence-scoring.js +118 -0
  21. package/dist/innocence-scoring.js.map +1 -0
  22. package/dist/language-detector.d.ts +162 -0
  23. package/dist/language-detector.js +952 -0
  24. package/dist/language-detector.js.map +1 -0
  25. package/dist/language-dicts.d.ts +60 -0
  26. package/dist/language-dicts.js +2718 -0
  27. package/dist/language-dicts.js.map +1 -0
  28. package/dist/languages/arabic-words.d.ts +10 -0
  29. package/dist/languages/arabic-words.js +1649 -0
  30. package/dist/languages/arabic-words.js.map +1 -0
  31. package/dist/languages/bengali-words.d.ts +10 -0
  32. package/dist/languages/bengali-words.js +1696 -0
  33. package/dist/languages/bengali-words.js.map +1 -0
  34. package/dist/languages/brazilian-words.d.ts +10 -0
  35. package/dist/languages/brazilian-words.js +2122 -0
  36. package/dist/languages/brazilian-words.js.map +1 -0
  37. package/dist/languages/chinese-words.d.ts +10 -0
  38. package/dist/languages/chinese-words.js +2728 -0
  39. package/dist/languages/chinese-words.js.map +1 -0
  40. package/dist/languages/english-primary-all-languages.d.ts +23 -0
  41. package/dist/languages/english-primary-all-languages.js +36894 -0
  42. package/dist/languages/english-primary-all-languages.js.map +1 -0
  43. package/dist/languages/english-words.d.ts +5 -0
  44. package/dist/languages/english-words.js +5156 -0
  45. package/dist/languages/english-words.js.map +1 -0
  46. package/dist/languages/french-words.d.ts +10 -0
  47. package/dist/languages/french-words.js +2326 -0
  48. package/dist/languages/french-words.js.map +1 -0
  49. package/dist/languages/german-words.d.ts +10 -0
  50. package/dist/languages/german-words.js +2633 -0
  51. package/dist/languages/german-words.js.map +1 -0
  52. package/dist/languages/hindi-words.d.ts +10 -0
  53. package/dist/languages/hindi-words.js +2341 -0
  54. package/dist/languages/hindi-words.js.map +1 -0
  55. package/dist/languages/innocent-words.d.ts +41 -0
  56. package/dist/languages/innocent-words.js +109 -0
  57. package/dist/languages/innocent-words.js.map +1 -0
  58. package/dist/languages/italian-words.d.ts +10 -0
  59. package/dist/languages/italian-words.js +2287 -0
  60. package/dist/languages/italian-words.js.map +1 -0
  61. package/dist/languages/japanese-words.d.ts +11 -0
  62. package/dist/languages/japanese-words.js +2557 -0
  63. package/dist/languages/japanese-words.js.map +1 -0
  64. package/dist/languages/korean-words.d.ts +10 -0
  65. package/dist/languages/korean-words.js +2509 -0
  66. package/dist/languages/korean-words.js.map +1 -0
  67. package/dist/languages/russian-words.d.ts +10 -0
  68. package/dist/languages/russian-words.js +2175 -0
  69. package/dist/languages/russian-words.js.map +1 -0
  70. package/dist/languages/spanish-words.d.ts +11 -0
  71. package/dist/languages/spanish-words.js +2536 -0
  72. package/dist/languages/spanish-words.js.map +1 -0
  73. package/dist/languages/tamil-words.d.ts +10 -0
  74. package/dist/languages/tamil-words.js +1722 -0
  75. package/dist/languages/tamil-words.js.map +1 -0
  76. package/dist/languages/telugu-words.d.ts +10 -0
  77. package/dist/languages/telugu-words.js +1739 -0
  78. package/dist/languages/telugu-words.js.map +1 -0
  79. package/dist/romanization-detector.d.ts +50 -0
  80. package/dist/romanization-detector.js +779 -0
  81. package/dist/romanization-detector.js.map +1 -0
  82. package/package.json +79 -0
@@ -0,0 +1,106 @@
1
+ # Contributors
2
+
3
+ Welcome to the allProfanity project! We're excited to have you here and grateful for your interest in contributing to making profanity detection better for everyone.
4
+
5
+ ## Our Contributors
6
+
7
+ Thank you to all the amazing people who have contributed to this project:
8
+
9
+ <!-- Add your name below this line -->
10
+ - Your Name (@your-github-username)
11
+ <!-- Keep the list alphabetically sorted -->
12
+
13
+ ---
14
+
15
+ ## How to Contribute
16
+
17
+ We welcome contributions of all kinds! Here are some ways you can help:
18
+
19
+ - Add support for new languages
20
+ - Improve existing word lists
21
+ - Enhance detection algorithms
22
+ - Fix bugs
23
+ - Improve documentation
24
+ - Add or improve test cases
25
+
26
+ ## Adding a New Language
27
+
28
+ When adding support for a new language, please follow these important guidelines:
29
+
30
+ ### Required Steps:
31
+
32
+ 1. **Add the word list** for the new language in the appropriate location
33
+ 2. **Update the configuration** to include the new language
34
+ 3. **Write comprehensive test cases** for the new language
35
+ - Include tests for common profane words
36
+ - Include tests for edge cases
37
+ - Include tests for false positives (words that should NOT be flagged)
38
+ 4. **Run all tests** and ensure they pass
39
+ 5. **Take a screenshot** of the passing tests
40
+ 6. **Attach the screenshot** to your Pull Request
41
+
42
+ ### Example Test Structure:
43
+
44
+ ```typescript
45
+ describe('Language: YourLanguage', () => {
46
+ it('should detect profanity', () => {
47
+ // Your test cases
48
+ });
49
+
50
+ it('should not flag clean words', () => {
51
+ // Your test cases
52
+ });
53
+ });
54
+ ```
55
+
56
+ ## Pull Request Guidelines
57
+
58
+ When submitting a Pull Request, please:
59
+
60
+ 1. **Provide a clear description** of what your PR does
61
+ 2. **Reference any related issues** (e.g., "Fixes #123")
62
+ 3. **Include test results** - attach a screenshot showing all tests passing
63
+ 4. **Follow the existing code style** and conventions
64
+ 5. **Keep changes focused** - one feature/fix per PR
65
+ 6. **Update documentation** if you're adding new features
66
+
67
+ ## Testing Your Changes
68
+
69
+ Before submitting a PR:
70
+
71
+ ```bash
72
+ # Install dependencies
73
+ npm install
74
+
75
+ # Run tests
76
+ npm test
77
+
78
+ # Run linting (if applicable)
79
+ npm run lint
80
+
81
+ # Build the project
82
+ npm run build
83
+ ```
84
+
85
+ Make sure all tests pass and take a screenshot to include in your PR!
86
+
87
+ ## Code of Conduct
88
+
89
+ - Be respectful and inclusive
90
+ - Provide constructive feedback
91
+ - Help others learn and grow
92
+ - Focus on what is best for the community
93
+
94
+ ## Questions or Need Help?
95
+
96
+ - Open an issue for bugs or feature requests
97
+ - Start a discussion for questions or ideas
98
+ - Check existing issues and PRs before creating new ones
99
+
100
+ ## Recognition
101
+
102
+ All contributors will be recognized in this file and in our release notes. Your contributions, no matter how small, are valuable and appreciated!
103
+
104
+ ---
105
+
106
+ Thank you for making allProfanity better! 🎉
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2025 Ayush Jadaun (original AllProfanity)
4
+ Copyright (c) 2026 Grassroots Labs Org (be-kind-profanity-filter fork)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE