this and this and this
parent
7180b464f9
commit
b5112e5494
|
@ -69,7 +69,7 @@ torture_regex = re.compile('(^|\s)(i|me)($|\s)', flags=re.I|re.A)
|
|||
torture_regex2 = re.compile("(^|\s)(i'm)($|\s)", flags=re.I|re.A)
|
||||
torture_regex3 = re.compile("(^|\s)(my|mine)($|\s)", flags=re.I|re.A)
|
||||
|
||||
sentence_ending_regex = re.compile('(\.|\?|\!)', flags=re.I|re.A)
|
||||
sentence_ending_regex = re.compile('(\.)', flags=re.I|re.A)
|
||||
normal_punctuation_regex = re.compile('(\"|\')', flags=re.I|re.A)
|
||||
more_than_one_comma_regex = re.compile('\,\,+', flags=re.I|re.A)
|
||||
|
||||
|
|
|
@ -689,11 +689,11 @@ def torture_ap(string, username):
|
|||
def torture_misogynist(string, key):
|
||||
if not string: return string
|
||||
string = string.lower()
|
||||
string = sentence_ending_regex.sub(",", string)
|
||||
string = sentence_ending_regex.sub(", and", string)
|
||||
string = normal_punctuation_regex.sub("", string)
|
||||
string = more_than_one_comma_regex.sub(",", string)
|
||||
if string[-1] == ',':
|
||||
string = string[0:-1]
|
||||
if string[-5:] == ', and':
|
||||
string = string[:-5]
|
||||
girl_phrase = GIRL_PHRASES[key%len(GIRL_PHRASES)]
|
||||
string = girl_phrase.replace("$", string)
|
||||
return string
|
||||
|
|
Loading…
Reference in New Issue