From 05c8eba11c51ca928eee9c041de1a4192e590aec Mon Sep 17 00:00:00 2001
From: nianjiuhuiyi <64776403+nianjiuhuiyi@users.noreply.github.com>
Date: 星期五, 27 六月 2025 09:57:45 +0800
Subject: [PATCH] Fix: 修复c++后端服务因为空数组的异常退出,以及c++的http服务在收到Ctrl+C信号后无法正常退出 (#2571)
---
fun_text_processing/inverse_text_normalization/ru/verbalizers/ordinal.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fun_text_processing/inverse_text_normalization/ru/verbalizers/ordinal.py b/fun_text_processing/inverse_text_normalization/ru/verbalizers/ordinal.py
index 7e175d3..348b3a9 100644
--- a/fun_text_processing/inverse_text_normalization/ru/verbalizers/ordinal.py
+++ b/fun_text_processing/inverse_text_normalization/ru/verbalizers/ordinal.py
@@ -1,4 +1,3 @@
-
import pynini
from fun_text_processing.text_normalization.en.graph_utils import DAMO_NOT_QUOTE, GraphFst
from pynini.lib import pynutil
@@ -18,6 +17,6 @@
super().__init__(name="ordinal", kind="verbalize", deterministic=deterministic)
value = pynini.closure(DAMO_NOT_QUOTE)
- graph = pynutil.delete("integer: \"") + value + pynutil.delete("\"")
+ graph = pynutil.delete('integer: "') + value + pynutil.delete('"')
delete_tokens = self.delete_tokens(graph)
self.fst = delete_tokens.optimize()
--
Gitblit v1.9.1