Expand description
The data of better_profanity 0.7.0: its word list, CHARS_MAPPING and ALLOWED_CHARACTERS.
Constants§
- CHARS_
MAPPING - The default
CHARS_MAPPING: the characters each letter of a word may be written as. - WORDLIST
profanity_wordlist.txt, the default word list (916 words and phrases, one per line).
Functions§
- allowed_
characters ALLOWED_CHARACTERS: characters that belong to words. Every other character separates them.- is_
python_ space - Python’s
str.isspace(), which is the same on CPython 3.9 to 3.15. - read_
wordlist - The non-empty lines of a word list with surrounding whitespace removed, as
better_profanity’s
read_wordlistreturns them from a file opened in text mode.