-
Notifications
You must be signed in to change notification settings - Fork 258
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
关于执行效率 #16
Comments
是的,这个分词好慢,不知道是不是作者写的有问题 |
@sinojyj @liupan182 我沒有遇到這個問題呢,剛剛執行了十個句子,包含“我在本地调试的时候,20字的句子切词需要30秒以上,请问会是哪些因素影响速度?”這個句字,大概 5 秒內完成,不過目前的效能的確不比 python 版本。若有可以改善的地方,也請幫忙改善,開源的目的就是在此~ |
结巴分词挺有名的,感谢作者的付出和努力,但是很多分词程序分词几百字只需要不到一秒,这个程序我第一次使用以及看你们线上的demo,速度有点难以接受,线上的我测试大概七秒,我下载后测试也差不多七八秒,觉得稍微慢了点 |
@liupan182 也只能持續改進囉~ |
我尝试过将生成的trie缓存起来,试过redis和本地存储两个方案,大约能节约3-4秒构建trie的时间。其中计算total和min的过程还是较慢,个人觉得这两个属性是否可以从cut方法中扔出去
发自网易邮箱大师
在2016年12月15日 14:11,liupan182 写道:
结巴分词挺有名的,感谢作者的付出和努力,但是很多分词程序分词几百字只需要不到一秒,这个程序我第一次使用以及看你们线上的demo,速度有点难以接受,线上的我测试大概七秒,我下载后测试也差不多七八秒,觉得稍微慢了点
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@sinojyj 緩存是一個方向,我在想可以將建構及詞頻的運算結果都緩存,然後客製詞典另外做運算,讓 jieba init 時先讀取緩存結果,大概會快一些吧~ 有空再來試試。 |
我fork了一个版本,正如你的想法,缓存了trie、total、min,但redis和filesys都不能直接缓存object,我做了序列化缓存。但反序列化还是存在1-2秒的开销。所以看看有无其他优化方向
发自网易邮箱大师
在2016年12月23日 18:45,Fukuball Lin 写道:
@sinojyj 緩存是一個方向,我在想可以將建構及詞頻的運算結果都緩存,然後客製詞典另外做運算,讓 jieba init 時先讀取緩存結果,大概會快一些吧~ 有空再來試試。
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@sinojyj 感覺你已經下了很多功夫,如果你有什麼成果請發一下 pull request 吧! |
我在本地调试的时候,20字的句子切词需要30秒以上,请问会是哪些因素影响速度?
The text was updated successfully, but these errors were encountered: