mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
update
This commit is contained in:
@@ -213,7 +213,7 @@ class CTRLStoryManager(ConstrainedStoryManager):
|
||||
for phrase in self.action_phrases:
|
||||
result = self.generate_action_result(self.story_context(), phrase, options=options)
|
||||
action_verb = result[0].split()[1]
|
||||
print("blacklisted verb is ", action_verb)
|
||||
|
||||
options["word_blacklist"][0].append(action_verb)
|
||||
results.append(result)
|
||||
return results
|
||||
|
||||
+13
-2
@@ -188,5 +188,16 @@ def second_to_first_person(text):
|
||||
return capitalize_first_letters(text[1:])
|
||||
|
||||
if __name__ == '__main__':
|
||||
text = 'You wake up in an old rundown hospital with no memory of how you got there. You look around and see a nurse standing over me. "Hey buddy, you okay?" she asks. She looks at me like I\'m crazy. '
|
||||
print(first_to_second_person(text))
|
||||
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user