diff --git a/story/story_manager.py b/story/story_manager.py index 29cdce6..cb4f2b4 100644 --- a/story/story_manager.py +++ b/story/story_manager.py @@ -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 diff --git a/story/utils.py b/story/utils.py index 586550a..036fd56 100644 --- a/story/utils.py +++ b/story/utils.py @@ -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)) \ No newline at end of file + + + 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) \ No newline at end of file