fix 5th tone bug
This commit is contained in:
3
main.py
3
main.py
@@ -66,9 +66,10 @@ pinyinToneMarks = {
|
||||
def convert_pinyin_callback(match):
|
||||
tone= int(match.group(3))
|
||||
vowel = match.group(1)
|
||||
|
||||
# the 5th tone is neutral
|
||||
if tone == 5:
|
||||
return match
|
||||
return match.group(0).replace('5', '')
|
||||
|
||||
# for multiple vowels, use first one if it is a/e/o, otherwise use second one
|
||||
pos=0
|
||||
|
||||
Reference in New Issue
Block a user