From c880db53646ab9fd26417f4baf004ab44cc24e1a Mon Sep 17 00:00:00 2001
From: lingji-yidong <75744976+lingji-yidong@users.noreply.github.com>
Date: 星期五, 28 六月 2024 01:28:24 +0800
Subject: [PATCH] Fix: Return tuple ('', []) when char_list is empty to prevent ValueError (#1857)
---
fun_text_processing/inverse_text_normalization/zh/__init__.py | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/fun_text_processing/inverse_text_normalization/zh/__init__.py b/fun_text_processing/inverse_text_normalization/zh/__init__.py
index 59ca10b..b21a931 100755
--- a/fun_text_processing/inverse_text_normalization/zh/__init__.py
+++ b/fun_text_processing/inverse_text_normalization/zh/__init__.py
@@ -1,17 +1,7 @@
-# Copyright NeMo (https://github.com/NVIDIA/NeMo). All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from fun_text_processing.inverse_text_normalization.zh.taggers.tokenize_and_classify import ClassifyFst
+from fun_text_processing.inverse_text_normalization.zh.taggers.tokenize_and_classify import (
+ ClassifyFst,
+)
from fun_text_processing.inverse_text_normalization.zh.verbalizers.verbalize import VerbalizeFst
-from fun_text_processing.inverse_text_normalization.zh.verbalizers.verbalize_final import VerbalizeFinalFst
+from fun_text_processing.inverse_text_normalization.zh.verbalizers.verbalize_final import (
+ VerbalizeFinalFst,
+)
--
Gitblit v1.9.1