From 09d8d33b3b852b99ce5ffc0d71b4b05abc978777 Mon Sep 17 00:00:00 2001 From: jianganbai Date: Thu, 31 Aug 2023 11:26:31 +0800 Subject: [PATCH] [fix]: fix re substitution --- wenet/dataset/processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wenet/dataset/processor.py b/wenet/dataset/processor.py index 466805f02..8dc82615c 100644 --- a/wenet/dataset/processor.py +++ b/wenet/dataset/processor.py @@ -420,7 +420,7 @@ def get_upper_txt(txt, special_tokens): """ txt = txt.upper() for token in special_tokens: - txt = re.subn(token.upper(), token, txt) + txt = re.sub(token.upper(), token, txt) return txt