MCPcopy
hub / github.com/TensorSpeech/TensorFlowTTS / normalize_number

Function normalize_number

tensorflow_tts/utils/korean.py:428–435  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

426
427
428def normalize_number(text):
429 text = normalize_with_dictionary(text, unit_to_kor1)
430 text = normalize_with_dictionary(text, unit_to_kor2)
431 text = re.sub(
432 number_checker + count_checker, lambda x: number_to_korean(x, True), text
433 )
434 text = re.sub(number_checker, lambda x: number_to_korean(x, False), text)
435 return text
436
437
438num_to_kor1 = [""] + list("일이삼사오육칠팔구")

Callers 1

normalizeFunction · 0.85

Calls 2

number_to_koreanFunction · 0.85

Tested by

no test coverage detected