Skip to main content

Module data

Module data 

Source
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_wordlist returns them from a file opened in text mode.