Plachta commited on
Commit
a723442
1 Parent(s): 537b2b9

Update text/mandarin.py

Browse files
Files changed (1) hide show
  1. text/mandarin.py +1 -2
text/mandarin.py CHANGED
@@ -7,7 +7,6 @@ import cn2an
7
  import logging
8
 
9
  logging.getLogger('jieba').setLevel(logging.WARNING)
10
- jieba.set_dictionary(os.path.dirname(sys.argv[0])+'/jieba/dict.txt')
11
  jieba.initialize()
12
 
13
 
@@ -327,4 +326,4 @@ def chinese_to_ipa2(text):
327
  text = re.sub(r'u([aoəe])', r'w\1', text)
328
  text = re.sub(r'([ʂɹ]ʰ?)([˩˨˧˦˥ ]+|$)', r'\1ʅ\2', text)
329
  text = re.sub(r'(sʰ?)([˩˨˧˦˥ ]+|$)', r'\1ɿ\2', text)
330
- return text
 
7
  import logging
8
 
9
  logging.getLogger('jieba').setLevel(logging.WARNING)
 
10
  jieba.initialize()
11
 
12
 
 
326
  text = re.sub(r'u([aoəe])', r'w\1', text)
327
  text = re.sub(r'([ʂɹ]ʰ?)([˩˨˧˦˥ ]+|$)', r'\1ʅ\2', text)
328
  text = re.sub(r'(sʰ?)([˩˨˧˦˥ ]+|$)', r'\1ɿ\2', text)
329
+ return text