-
Notifications
You must be signed in to change notification settings - Fork 314
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
type: 'all'
选项输出增加多音字标记字段
#206
Comments
在 #208 中新增了 |
我看到目前新增的 这会增加一些遍历成本,我其实更希望这个字段是一个布尔值,具体的有几个读音可以单独获取,这样不影响第一次的渲染效率。 |
理想情况下,API 可考虑如下设计:
最终字多音字的读音还是统一通过
import { polyphonic } from 'pinyin-pro';
const resultString = polyphonic('一', { toneSandhi: true, } ); // 返回所有读音包含变调读音:['yī', 'yí', 'yì']
const resultAll = polyphonic('一', { type: 'all', toneSandhi: true, }); // 为变调读音输出单独的字段标识。 |
经测试目前在 |
这个可以有,因为 另外,轻声也不是多音字,可能也需要单独的标记字段。 |
功能描述
通过新增一个多音字标记字段,可以快速知道哪些是多音字,进而再通过单独的
polyphonic
函数来获取每个多音字的所有读音。The text was updated successfully, but these errors were encountered: