Skip to content

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

@nww57

Description

@nww57

现在的:
多音字:好(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查找时也能根据字+音调查找

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions