From d6e8c17ba6eef78ddae75edd8b3dd8f69b3f0bf4 Mon Sep 17 00:00:00 2001
From: Binbin Gu <gubinbin@outlook.com>
Date: 星期四, 27 四月 2023 17:10:20 +0800
Subject: [PATCH] Update cardinal.py
---
fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py b/fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py
index 6b2fce5..539acbc 100644
--- a/fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py
+++ b/fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py
@@ -27,7 +27,7 @@
graph_hundreds = pynini.string_file(get_abs_path("data/numbers/hundreds.tsv"))
graph_thousand = pynini.string_file(get_abs_path("data/numbers/thousand.tsv"))
- graph_cents = pynini.cross("seratus", "100") | pynini.cross("ratus", "100") | pynini.union(graph_hundreds, pynutil.insert("00"))
+ graph_cents = pynini.cross("seratus", "100") | pynini.cross("ratus", "100") | pynini.union(graph_hundreds, pynutil.insert("0"))
graph_hundred = pynini.cross("ratus", "") | pynini.cross("seratus", "")
graph_hundred_component = pynini.union(graph_digit + delete_space + graph_hundred, pynutil.insert("00"))
--
Gitblit v1.9.1