forked from MarseyWorld/MarseyWorld
refix https://rdrama.net/h/moemorphism/post/308078/patrick-batemanchan/7165241#context without causing more problems :marseyunaware:
parent
17ac446781
commit
bb3ca7f5a5
|
@ -1,3 +1,5 @@
|
|||
import string
|
||||
|
||||
from owoify.structures.word import Word
|
||||
from owoify.utility.interleave_arrays import interleave_arrays
|
||||
from owoify.utility.presets import *
|
||||
|
@ -45,7 +47,9 @@ def owoify(source, chud_phrase):
|
|||
return ''.join(result_strings)
|
||||
|
||||
def owoify_map_token_custom(token, ignored_words):
|
||||
if token.word.lower() in ignored_words:
|
||||
word_without_punc = token.word.lower().translate(str.maketrans('', '', string.punctuation))
|
||||
|
||||
if word_without_punc in ignored_words:
|
||||
return token
|
||||
|
||||
for pattern in OWO_EXCLUDE_PATTERNS:
|
||||
|
|
Loading…
Reference in New Issue