From 76a9a266e5db21d31cfe07841f1b16dff6c5fe32 Mon Sep 17 00:00:00 2001 From: litagin02 Date: Fri, 5 Jan 2024 21:49:29 +0900 Subject: [PATCH] =?UTF-8?q?Move=20replacing=20of=20=E3=82=94=20to=20more?= =?UTF-8?q?=20appropriate=20position=20(maybe=20not=20so=20important)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- text/japanese.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/text/japanese.py b/text/japanese.py index de53a4d..af49eac 100644 --- a/text/japanese.py +++ b/text/japanese.py @@ -38,9 +38,6 @@ def hiragana2p(text: str) -> str: # 2文字からなる変換規則 text = text.replace("ぅ゛", " v u") - # ゔの処理を追加 - text = text.replace("ゔ", " v u") - text = text.replace("あぁ", " a a") text = text.replace("いぃ", " i i") text = text.replace("いぇ", " i e") @@ -244,6 +241,7 @@ def hiragana2p(text: str) -> str: text = text.replace("あ", " a") text = text.replace("い", " i") text = text.replace("う", " u") + text = text.replace("ゔ", " v u") # ゔの処理を追加 text = text.replace("え", " e") text = text.replace("お", " o") text = text.replace("か", " k a")