Parakeet/parakeet/frontend/punctuation.py

34 lines
421 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import abc
import string
__all__ = ["get_punctuations"]
EN_PUNCT = [
" ",
"-",
"...",
",",
".",
"?",
"!",
]
CN_PUNCT = [
"",
"",
"",
"",
"",
"",
""
]
def get_punctuations(lang):
if lang == "en":
return EN_PUNCT
elif lang == "cn":
return CN_PUNCT
else:
raise ValueError(f"language {lang} Not supported")