dictionary profanity filter
1.0.0
Module Python pour le filtrage des blasphèmes à l'aide de dictionnaires. Il soutient les langues anglaises et russes prêtes à l'emploi.
Utilisez la commande suivante pour installer le package à l'aide de PIP:
pip install dictionary-profanity-filterVoici plusieurs exemples de l'utilisation du module:
from dictionary_profanity_filter import ProfanityFilter
profanity_filter = ProfanityFilter () profanity_filter . add_words ([ 'censorship' , 'blocking' ])
profanity_filter . censor ( 'I hate censorship and blocking!' )
# Output: 'I hate ********** and ********!' profanity_filter . is_clean ( 'Porn is a restricted word' )
# Output: False profanity_filter . remove_word ( 'blocking' )
profanity_filter . censor ( 'I hate censorship and blocking!' )
# Output: 'I hate ********** and blocking!'