Skip to content

Commit

Permalink
Add specific fixes to furigana generation
Browse files Browse the repository at this point in the history
  • Loading branch information
toasterofbread committed Nov 5, 2022
1 parent 1211696 commit 3ac4343
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/lyrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ def getKey(term, key: str) -> str:
hira = getKey(term, "hira")

if orig != hira:
line_data += trimOkurigana(orig, hira)
terms = trimOkurigana(orig, hira)
for i in range(len(terms)):
if len(terms[i]) > 0:
match terms[i][0]:
case "日": terms[i][1] = "ひ"
case "君": terms[i][1] = "きみ"
line_data += terms
else:
line_data.append([orig])

Expand Down

0 comments on commit 3ac4343

Please sign in to comment.