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

Function normalize_quote

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

Source from the content-addressed store, hash-verified

409
410
411def normalize_quote(text):
412 def fn(found_text):
413 from nltk import sent_tokenize # NLTK doesn't along with multiprocessing
414
415 found_text = found_text.group()
416 unquoted_text = found_text[1:-1]
417
418 sentences = sent_tokenize(unquoted_text)
419 return " ".join(["'{}'".format(sent) for sent in sentences])
420
421 return re.sub(quote_checker, fn, text)
422
423
424number_checker = "([+-]?\d[\d,]*)[\.]?\d*"

Callers 1

normalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected