mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
improved first to second mappings
This commit is contained in:
@@ -20,7 +20,7 @@ def loss(labels, logits):
|
||||
|
||||
class CTRLGenerator():
|
||||
|
||||
def __init__(self, control_code="Horror Text: ", generate_num=128, temperature=0.3):
|
||||
def __init__(self, control_code="Horror Text: ", generate_num=64, temperature=0.3):
|
||||
|
||||
self.generate_num=generate_num
|
||||
model_dir = "generator/ctrl/model/seqlen256_v1.ckpt/"
|
||||
|
||||
+17
-14
@@ -61,27 +61,30 @@ def replace_outside_quotes(text, current_word, repl_word):
|
||||
|
||||
|
||||
first_to_second_mappings = [
|
||||
("I'm", "you're"),
|
||||
("I am", "you are"),
|
||||
("I'm ", "you're "),
|
||||
("I am ", "you are "),
|
||||
("I ", "you "),
|
||||
("I've", "You've"),
|
||||
("my", "your"),
|
||||
("My", "Your"),
|
||||
("I've ", "You've "),
|
||||
("my ", "your "),
|
||||
("My ", "Your "),
|
||||
("we ","you "),
|
||||
("We ","You "),
|
||||
(" mine"," yours"),
|
||||
("me", "you"),
|
||||
(" me", " you"),
|
||||
(" us ", " you "),
|
||||
(" us.", " you."),
|
||||
("our ", "your ")
|
||||
]
|
||||
|
||||
second_to_first_mappings = [
|
||||
("You're", "I'm"),
|
||||
("you're", "I'm"),
|
||||
("Your", "My"),
|
||||
("your", "my"),
|
||||
("you are", "I am"),
|
||||
("You are", "I am"),
|
||||
("You", "I"),
|
||||
("you", "I"),
|
||||
("You're ", "I'm "),
|
||||
("you're ", "I'm "),
|
||||
("Your ", "My "),
|
||||
("your ", "my "),
|
||||
("you are ", "I am "),
|
||||
("You are ", "I am "),
|
||||
("You ", "I "),
|
||||
("you ", "I "),
|
||||
]
|
||||
|
||||
def capitalize_helper(string):
|
||||
|
||||
Reference in New Issue
Block a user