Skip to content

Commit

Permalink
Rearranged some tasks and json edit
Browse files Browse the repository at this point in the history
Rearranged the order in which replacements are made, added changes to json.
  • Loading branch information
Bikatr7 committed Jan 16, 2023
1 parent d80db4f commit 04fa058
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Kudasai.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def replace(): ## defines the replace function

replacement_rules = [ ## creates a list of tuples containing the replacement rules
('Punctuation', 'kutouten', False, None, None), ## tuple for replacing special words
('Words','single_words',False,None,None),
('Phrases','phrases',False,None,None),
('Words','single_words',False,None,None),
('Full Names', 'full_names', True,Names.ALL_NAMES, Names.FULL_NAME), ## tuple for replacing remaining names
('Single Names', 'single_names', True, Names.LAST_NAME, Names.LAST_NAME), ## tuple for replacing single names
('Name Like', 'name_like', True, Names.LAST_NAME, Names.NONE), ## tuple for replacing name-like words
Expand Down
40 changes: 23 additions & 17 deletions Replacements.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"さん": "san",
"くん": "kun",
"ちゃん": "chan",
"せんぱい": "senpai",
"君": "kun",
"様": "sama",
"先輩": "senpai",
"後輩": "kouhai",
"先生": "sensei",
"殿": "dono",
"上": "ue",
Expand All @@ -17,7 +19,24 @@
},

"phrases": {
"ホワイトルーム": "White Room"
},

"kutouten": {
"「": "\"",
"」": "\"",
"。": ".",
"、": ",",
"『": ">>",
"』": "<<",
"・": ".",
"―": "-"
},

"name_like": {
"お兄": "Onii",
"兄": "Nii",
"お姉": "Onee",
"姉": "Nee"
},

"single_names": {
Expand All @@ -29,7 +48,8 @@
"Kisarazu": "木更津",
"Souya": "宗谷",
"Ohba": "大場",
"Ishida": "石田"
"Ishida": "石田",
"Shiro": "志朗"
},

"full_names": {
Expand Down Expand Up @@ -305,20 +325,6 @@
"小橋",
""
]
},

"kutouten": {
"「": "\"",
"」": "\"",
"。": ".",
"、": ",",
"『": "«",
"』": "»"
},
"name_like": {
"お兄": "Onii",
"兄": "Nii",
"お姉": "Onee",
"姉": "Nee"
}

}

0 comments on commit 04fa058

Please sign in to comment.