ParakeetRebeccaRosario/parakeet/frontend/punctuation.py

34 lines
421 B
Python
Raw Normal View History

2020-10-20 16:06:11 +08:00
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")