mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-10 11:40:48 +08:00
Develop (#23)
* various small changes * various small changes * update * update * update * update * update * auto save * change model loc * updated instructions * moved to gcloud storage * fixed cd issue * update * UpdateCensor * UpdateCensor
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
rape
|
||||
shitting
|
||||
raped
|
||||
+5
-16
@@ -6,7 +6,10 @@ from difflib import SequenceMatcher
|
||||
YAML_FILE = "story/story_data.yaml"
|
||||
|
||||
from profanityfilter import ProfanityFilter
|
||||
pf = ProfanityFilter()
|
||||
with open("story/extra_censored_words.txt", "r") as f:
|
||||
more_words = [l.replace("\n", "") for l in f.readlines()]
|
||||
|
||||
pf = ProfanityFilter(extra_censor_list=more_words)
|
||||
|
||||
def console_print(text, width=75):
|
||||
last_newline = 0
|
||||
@@ -263,18 +266,4 @@ def second_to_first_person(text):
|
||||
for variation in variations:
|
||||
text = replace_outside_quotes(text, variation[0], variation[1])
|
||||
|
||||
return capitalize_first_letters(text[1:])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
result = 'The only thing they can tell you is, "We have nowhere else to…"'
|
||||
result = result.replace('."', '".')
|
||||
result = result.replace("#", "")
|
||||
result = result.replace("*", "")
|
||||
result = first_to_second_person(result)
|
||||
result = remove_profanity(result)
|
||||
|
||||
while ("\n \n \n " in result):
|
||||
result = result.replace("\n \n \n ", "\n \n ")
|
||||
|
||||
print(result)
|
||||
return capitalize_first_letters(text[1:])
|
||||
Reference in New Issue
Block a user