Cleaners: | |
def chinese_cleaners(text): | |
from pypinyin import Style, pinyin | |
phones = [phone[0] for phone in pinyin(text, style=Style.TONE3)] | |
return ' '.join(phones) | |
Symbols: | |
'_;:,。!?-“”《》、()…— ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123450BP' |