From 8e4643b452c81ba8fffa1b83cdc6db84847ae44d Mon Sep 17 00:00:00 2001 From: CjangCjengh <101577701+CjangCjengh@users.noreply.github.com> Date: Thu, 10 Nov 2022 21:20:06 +0800 Subject: [PATCH] Update cleaners.py --- text/cleaners.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/text/cleaners.py b/text/cleaners.py index c80e113..14874a1 100644 --- a/text/cleaners.py +++ b/text/cleaners.py @@ -46,8 +46,7 @@ def zh_ja_mixture_cleaners(text): def sanskrit_cleaners(text): text = text.replace('॥', '।').replace('ॐ', 'ओम्') - if text[-1] != '।': - text += ' ।' + text = re.sub(r'([^।])$', r'\1।', text) return text