It is so nice you wanna contribute to this repository. Thank you very much.
You may contribute in several ways like:
- Creating new features
- Fixing bugs
- Improving documentation and examples
The main API interface is in profanity.py, which will call the complexed processing functions in utils.py
The alphabetic_unicode.json contains the Unicode characters (from categories Ll
, Lu
, Mc
and Mn
). More on Unicode categories can be found here.
The profanity_wordlist.txt contains all the swear words to be censored.
The tests.py is for now the only unit test file in the project.
This package uses unittest for testing.
$ python tests.py
For example, run all test cases in class [ProfanityTest]((./tests.py#L6):
$ python -m unittest tests.ProfanityTest
For example, run the test test_censorship_empty_text in class [ProfanityTest]((./tests.py#L6):
$ python -m unittest tests.ProfanityTest.test_censorship_empty_text
Use the GitHub issue tracker to report any bug you find. Bugs description should include:
- How to reproduce the bug;
- Easy to understand title;
Would be nice to have some code showing how to reproduce the code, you may use gist for uploading your example code.
Use the GitHub issue tracker to request a new feature.
Commit messages should includes GitHub number reference and a imperative easy to understand sentence.
This project follows PEP 8 and PEP 484 for Python.
Thank you for reading this.
Give this repo a star and/or share it with your friends.