From bd9e63063f7cf6cd5f61d8633472fdd4b63484be Mon Sep 17 00:00:00 2001
From: szsteven008 <97944818+szsteven008@users.noreply.github.com>
Date: 星期二, 28 五月 2024 11:03:56 +0800
Subject: [PATCH] 修复了onnxruntime在macos下编译失败的错误 (#1748)
---
fun_text_processing/text_normalization/en/verbalizers/abbreviation.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fun_text_processing/text_normalization/en/verbalizers/abbreviation.py b/fun_text_processing/text_normalization/en/verbalizers/abbreviation.py
index 1c5a0ca..c3812aa 100644
--- a/fun_text_processing/text_normalization/en/verbalizers/abbreviation.py
+++ b/fun_text_processing/text_normalization/en/verbalizers/abbreviation.py
@@ -1,5 +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 +16,6 @@
def __init__(self, deterministic: bool = True):
super().__init__(name="abbreviation", kind="verbalize", deterministic=deterministic)
- graph = pynutil.delete("value: \"") + pynini.closure(DAMO_NOT_QUOTE, 1) + pynutil.delete("\"")
+ graph = pynutil.delete('value: "') + pynini.closure(DAMO_NOT_QUOTE, 1) + pynutil.delete('"')
delete_tokens = self.delete_tokens(graph)
self.fst = delete_tokens.optimize()
--
Gitblit v1.9.1