We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
代码: console.log( "不开启姓氏模式,曾乐的读音:", pinyin("曾乐", { toneType: "none", }) );
console.log( "开启姓氏模式,曾乐的读音:", pinyin("曾乐", { toneType: "none", mode: "surname", }) );
结果: 不开启姓氏模式,曾乐的读音: ceng le 开启姓氏模式,曾乐的读音: zeng yue
试了一下其他姓氏也会这样
问:姓氏模式打开应该只会订正姓的读音,而不应该订正名字的读音?请问是否有这个功能呢
The text was updated successfully, but these errors were encountered:
感谢反馈,本周会支持一下姓名模式只对字符串开头姓氏做匹配
Sorry, something went wrong.
已在 3.21.0 版本支持该功能,设置 surname: 'head' 即可只识别字符串开头的姓氏
3.21.0
surname: 'head'
Successfully merging a pull request may close this issue.
代码:
console.log(
"不开启姓氏模式,曾乐的读音:",
pinyin("曾乐", {
toneType: "none",
})
);
console.log(
"开启姓氏模式,曾乐的读音:",
pinyin("曾乐", {
toneType: "none",
mode: "surname",
})
);
结果:
不开启姓氏模式,曾乐的读音: ceng le
开启姓氏模式,曾乐的读音: zeng yue
试了一下其他姓氏也会这样
问:姓氏模式打开应该只会订正姓的读音,而不应该订正名字的读音?请问是否有这个功能呢
The text was updated successfully, but these errors were encountered: