Naozumi0512 commited on
Commit
22a3e5f
1 Parent(s): 278be5b

Update text/chinese.py

Browse files
Files changed (1) hide show
  1. text/chinese.py +2 -0
text/chinese.py CHANGED
@@ -153,6 +153,8 @@ def jyuping_to_initials_finals_tones(jyuping_syllables):
153
 
154
  def get_jyutping(text):
155
  jp = jyutping.convert(text)
 
 
156
  jp_array = jp.split()
157
  return jp_array
158
 
 
153
 
154
  def get_jyutping(text):
155
  jp = jyutping.convert(text)
156
+ for symbol in punctuation:
157
+ jp = jp.replace(symbol, " " + symbol + " ")
158
  jp_array = jp.split()
159
  return jp_array
160