Got it to a solid state. Still can work on past tense to present tense conversion and splititng action words at and and but, but making good progress.

This commit is contained in:
Nick
2019-09-24 16:14:04 -06:00
parent dd91ff7e68
commit 5dadf2ca36
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ def play_constrained():
story_manager = CTRLStoryManager(generator)
story_manager.start_new_story(prompt)
console_print("\n\n\n")
console_print("\n")
console_print(str(story_manager.story))
possible_actions = story_manager.get_possible_actions()
while (True):
+1 -1
View File
@@ -22,7 +22,7 @@ def loss(labels, logits):
class CTRLGenerator():
def __init__(self, control_code="Horror Text: ", generate_num=64, temperature=0.3):
def __init__(self, control_code="Horror Text: ", generate_num=100, temperature=0.3):
self.generate_num=generate_num
model_dir = "generator/ctrl/model/seqlen256_v1.ckpt/"
+2
View File
@@ -72,9 +72,11 @@ def replace_outside_quotes(text, current_word, repl_word):
first_to_second_mappings = [
("I'm ", "you're "),
(" I'm ", " you're "),
(" I'm ", " you're "),
("I am ", "you are "),
("I ", "you "),
("I've ", "You've "),
(" I've ", " You've "),
("my ", "your "),
(" my ", " your "),
("My ", "Your "),