make profanity filter actually usable
parent
1a30d6ccad
commit
a66add3897
|
@ -107,40 +107,26 @@ SLURS = {
|
||||||
|
|
||||||
PROFANITIES = {
|
PROFANITIES = {
|
||||||
'motherfucker': 'motherlover',
|
'motherfucker': 'motherlover',
|
||||||
'fucking': ['fricking', 'fudging', 'freaking', 'f-wording', 'f-bombing', 'cussing'],
|
'fuck': 'frick',
|
||||||
'fucked': ['fricked', 'fudged', 'freaked', 'f-worded', 'f-bombed', 'cussed'],
|
'shitting': 'pooping',
|
||||||
'fucker': ['fricker', 'fudger', 'freaker', 'f-worder', 'f-bomber', 'cusser'],
|
|
||||||
'fuck': ['frick', 'fudge', 'freak', 'f-word', 'f-bomb', 'cuss'],
|
|
||||||
' asshole': [' butthole ', ' ahole '],
|
|
||||||
' arsehole': [' butthole ', ' ahole '],
|
|
||||||
' ass ': [' butt ', ' backside ', ' rear end ', ' bum ', ' tochus '],
|
|
||||||
' ass ': [' butt ', ' backside ', ' rear end ', ' bum ', ' touchs '],
|
|
||||||
' arse ': [' butt ', ' backside ', ' rear end ', ' bum ', ' tochus '],
|
|
||||||
' arse ': [' butt ', ' backside ', ' rear end ', ' bum ', ' touchs '],
|
|
||||||
'shitting': ['pooping', 'crapping'],
|
|
||||||
'shitted': ['pooped', 'crapped', 'puckeyed'],
|
|
||||||
'shit': ['poop', 'crap', 'puckey'],
|
|
||||||
'lmao': 'lmbo',
|
'lmao': 'lmbo',
|
||||||
'damn': ['dang', 'darn'],
|
'damn': 'darn',
|
||||||
'bastard': ['fatherless child'],
|
'bastard': 'fatherless child',
|
||||||
' piss': ' pee',
|
'bitch': 'b-word',
|
||||||
'bitch': ['b-word', 'mean lady'],
|
|
||||||
'dick': 'weiner',
|
|
||||||
'cock': 'weiner',
|
|
||||||
'penis': 'peepee',
|
|
||||||
'pussy': 'girl weiner',
|
|
||||||
'vagina': 'girl peepee',
|
|
||||||
'cunt': 'rude lady',
|
|
||||||
' hell ': [' heck ', ' h-e-double-hockey-sticks '],
|
|
||||||
' sex ': ' intercourse ',
|
|
||||||
' sexual intercourse ': ' sexual congress ',
|
|
||||||
' god ': ' gosh ',
|
|
||||||
' wanker ': ' rude masturbator ',
|
|
||||||
' twat ': ' girl weiner ',
|
|
||||||
' cum ': ' c*m ',
|
|
||||||
' orgasm ': ' sexual climax ',
|
|
||||||
'toilet': 'potty',
|
'toilet': 'potty',
|
||||||
|
' asshole': ' butthole',
|
||||||
' rape ': ' r*pe ',
|
' rape ': ' r*pe ',
|
||||||
|
' hell ': ' heck ',
|
||||||
|
' sex ': ' intercourse ',
|
||||||
|
' god ': ' gosh ',
|
||||||
|
' cum ': ' c*m ',
|
||||||
|
'orgasm': 'sexual climax',
|
||||||
|
'dick': 'peepee',
|
||||||
|
'cock': 'peepee',
|
||||||
|
'penis': 'peepee',
|
||||||
|
'pussy': 'girl peepee',
|
||||||
|
'vagina': 'girl peepee',
|
||||||
|
' twat': ' girl peepee',
|
||||||
}
|
}
|
||||||
|
|
||||||
if SITE_NAME == 'rDrama':
|
if SITE_NAME == 'rDrama':
|
||||||
|
@ -174,7 +160,7 @@ if SITE_NAME == 'rDrama':
|
||||||
" pedo ": " libertarian ",
|
" pedo ": " libertarian ",
|
||||||
" kys": " keep yourself safe",
|
" kys": " keep yourself safe",
|
||||||
"kys ": "keep yourself safe ",
|
"kys ": "keep yourself safe ",
|
||||||
"republican": ['republiKKKan', 'republicunt', 'rethuglican'],
|
"republican": 'republiKKKan',
|
||||||
}
|
}
|
||||||
SLURS.update(RDRAMA_SLURS)
|
SLURS.update(RDRAMA_SLURS)
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,6 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str],
|
||||||
return match_str
|
return match_str
|
||||||
else:
|
else:
|
||||||
repl = replace_with[match_str.lower()]
|
repl = replace_with[match_str.lower()]
|
||||||
if not isinstance(repl, str):
|
|
||||||
repl = random.choice(repl)
|
|
||||||
return repl if not upper or "<img" in repl else repl.upper()
|
return repl if not upper or "<img" in repl else repl.upper()
|
||||||
|
|
||||||
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):
|
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):
|
||||||
|
|
Loading…
Reference in New Issue