Skip to content
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

多音字在组词和随机生成词语时,根据传入的音调过滤 #302

Open
nww57 opened this issue Jan 25, 2025 · 0 comments
Open

Comments

@nww57
Copy link

nww57 commented Jan 25, 2025

现在的:
多音字:好(Hǎo|Hào)
调用cnchar.words("好")后:[ "爱好","好奇", "好多", "好孩子",...]
期望:
cnchar.words("好|hao3") :["好多", "好孩子",...]
cnchar.words("好|hao4") :["爱好","好奇",...]

随机生成词语时:
cnchar.random.words(options?: {
number?: number; // 生成数量 默认1
length?: number; // 词语长度 默认不限制
match?: string; // 查找包含match的词语
}): string;
match查找时也能根据字+音调查找

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant