-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong pinyin when using Traditional characters #6
Comments
List<String> traditionalDict= [ '乾=干'];
ChineseHelper.addChineseDict(traditionalDict);
var testTrad = PinyinHelper.getPinyin('乾淨', format: PinyinFormat.WITH_TONE_MARK);
print(testTrad); |
Thank you! It works already better! But how about characters that have multiple pinyin? For example: List<String> traditionalDict = ['乾=干'];
ChineseHelper.addChineseDict(traditionalDict);
var testTrad = PinyinHelper.getPinyin('乾燥', format: PinyinFormat.WITH_TONE_MARK);
var testTrad2 = PinyinHelper.getPinyin('乾坤', format: PinyinFormat.WITH_TONE_MARK);
print(testTrad);
print(testTrad2); Output:
Shoudn't it be |
This is a problem, maybe this solution is better. List<String> multiDict = ['乾净=gān,jìng', '乾燥=gān,zào'];
PinyinHelper.addMultiPinyinDict(multiDict);
var testTrad = PinyinHelper.getPinyin('乾淨', format: PinyinFormat.WITH_TONE_MARK);
print(testTrad); |
Good suggestion, thank you for your help 🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
Output:
The text was updated successfully, but these errors were encountered: