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

Function normalize_with_dictionary

tensorflow_tts/utils/korean.py:382–387  ·  view source on GitHub ↗
(text, dic)

Source from the content-addressed store, hash-verified

380
381
382def normalize_with_dictionary(text, dic):
383 if any(key in text for key in dic.keys()):
384 pattern = re.compile("|".join(re.escape(key) for key in dic.keys()))
385 return pattern.sub(lambda x: dic[x.group()], text)
386 else:
387 return text
388
389
390def normalize_english(text):

Callers 2

normalizeFunction · 0.85
normalize_numberFunction · 0.85

Calls 1

compileMethod · 0.45

Tested by

no test coverage detected