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

初次加载时很慢,有没有初始化方法,可以在app载入时就初始化 #9

Closed
gedoor opened this issue Feb 17, 2020 · 2 comments

Comments

@gedoor
Copy link

gedoor commented Feb 17, 2020

刚打开app,转换一章小说要好几秒,再次转换就快了

@houbb
Copy link
Owner

houbb commented Feb 17, 2020

第一次慢主要是因为结巴分词比较慢,他需要加载一个本地的字典。

你可以进行一次预加载,比如在服务启动的时候先随便做一次转换:

比如你希望转换为简体:

ZhConverterUtil.toSimple("随便输入一个中文句子,忽略结果即可。");

后续可以考虑引入一个提前初始化的功能。

@houbb houbb closed this as completed Feb 17, 2020
@gedoor
Copy link
Author

gedoor commented Feb 17, 2020

ok

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

2 participants