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
比如: 七夕节,又叫“乞巧节”,发 生成的拼音:
七夕节,又叫“乞巧节”,发
[ "qī", "xī", "jié", ",", "yòu", "jiào", "“", "qǐ", "qiǎo", "jié", "”,", "fā" ]
中文引号和中文逗号成了一个拼音, 而不是2个 原代码:
import pinyin from 'pinyin'; @Injectable() export class PinyinService { transform(text: string): string[] { return pinyin(text).map((item) => item[0]); } }
版本 "pinyin": "4.0.0-alpha.2"
The text was updated successfully, but these errors were encountered:
是的,中文是会每个字拆开的,其他字符(比如标点、英文、数字等)都是整体拼接在一起的。 因为中文拼音会使用 join(' ') 拼接来展示,而其他字符需要保持原有格式,所以是不拆分的。
Sorry, something went wrong.
No branches or pull requests
比如:
七夕节,又叫“乞巧节”,发
生成的拼音:
中文引号和中文逗号成了一个拼音, 而不是2个
原代码:
版本 "pinyin": "4.0.0-alpha.2"
The text was updated successfully, but these errors were encountered: