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

Function normalize

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

Source from the content-addressed store, hash-verified

364
365
366def normalize(text):
367 text = text.strip()
368
369 text = re.sub("\(\d+일\)", "", text)
370 text = re.sub("\([⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〺〻㐀-䶵一-鿃豈-鶴侮-頻並-龎]+\)", "", text)
371
372 text = normalize_with_dictionary(text, etc_dictionary)
373 text = normalize_english(text)
374 text = re.sub("[a-zA-Z]+", normalize_upper, text)
375
376 text = normalize_quote(text)
377 text = normalize_number(text)
378
379 return text
380
381
382def normalize_with_dictionary(text, dic):

Callers 1

tokenizeFunction · 0.70

Calls 4

normalize_englishFunction · 0.85
normalize_quoteFunction · 0.85
normalize_numberFunction · 0.85

Tested by

no test coverage detected