소스 검색

Merge pull request #430 from gbbin/patch-1

Update cardinal.py
zhifu gao 2 년 전
부모
커밋
9379dbf883
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py

+ 1 - 1
fun_text_processing/inverse_text_normalization/id/taggers/cardinal.py

@@ -27,7 +27,7 @@ class CardinalFst(GraphFst):
         graph_hundreds = pynini.string_file(get_abs_path("data/numbers/hundreds.tsv"))
         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_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 = pynini.cross("ratus", "") | pynini.cross("seratus", "")
 
 
         graph_hundred_component = pynini.union(graph_digit + delete_space + graph_hundred, pynutil.insert("00"))
         graph_hundred_component = pynini.union(graph_digit + delete_space + graph_hundred, pynutil.insert("00"))