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

多音字词语生成拼音不正确。代码如下: #112

Open
lonniewen opened this issue May 22, 2023 · 2 comments
Open

多音字词语生成拼音不正确。代码如下: #112

lonniewen opened this issue May 22, 2023 · 2 comments
Labels

Comments

@lonniewen
Copy link

		System.out.println(WordsHelper.GetAllPinyin('乐', true));
		System.out.println(WordsHelper.GetPinyin("如果是一个完整的语句它就不能正确地分辨读音,比如智者乐水仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("不能正确地分辨读音,比如智者乐水仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("分辨读音,比如智者乐水仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("读音,比如智者乐水仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("比如智者乐水仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("智者乐水仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("智者乐水", true));
		System.out.println(WordsHelper.GetPinyin("智者乐水。", true));
		System.out.println(WordsHelper.GetPinyin("智者乐水,仁者乐山。", true));
		System.out.println(WordsHelper.GetPinyin("比如“智者乐水,仁者乐山。”", true));

输出结果为:

[Lè, Yuè, Yào, Lào, Yue]
RúGuǒShìYíGèWánZhěngDeYǔJùTāJiùBùNéngZhèngQuèDìFēnBiànDúYīn,BǐRúZhìZhěYàoShuǐRénZhěYàoShān。
BùNéngZhèngQuèDìFēnBiànDúYīn,BǐRúZhìZhěYàoShuǐRénZhěYàoShān。
FēnBiànDúYīn,BǐRúZhìZhěYàoShuǐRénZhěYàoShān。
DúYīn,BǐRúZhìZhěYàoShuǐRénZhěYàoShān。
BǐRúZhìZhěLèShuǐRénZhěYàoShān。
ZhìZhěLèShuǐRénZhěYàoShān。
ZhìZhěLèShuǐ
ZhìZhěLèShuǐ。
ZhìZhěLèShuǐ,RénZhěYàoShān。
BǐRú“ZhìZhěYàoShuǐ,RénZhěYàoShān。”

在不同的位置“智者乐(Yào)水”输出的结果不一样。

@lonniewen
Copy link
Author

另“正确地”里这个“地”应该为"De"

@toolgood
Copy link
Owner

toolgood commented Jun 2, 2023

嗯,分词没做好。。。

@toolgood toolgood added the bug label Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants