解霸Python绑定
rjieba的Python项目详细描述
rjieba py公司
jieba-rsPython绑定。在
安装
pip install rjieba
使用
^{pr2}$性能
运行于MacBook Pro(15英寸,2018)2.2 GHz 6核Intel Core i7
In[1]:importjiebaIn[2]:importcjiebaIn[3]:importrjiebaIn[4]:jieba.initialize()Buildingprefixdictfromthedefaultdictionary...Loadingmodelfromcache/var/folders/8d/h3lyjgz14296j_lw7chgf5hc0000gp/T/jieba.cacheLoadingmodelcost0.695seconds.Prefixdicthasbeenbuiltsuccessfully.In[5]:cjieba.initialize()In[6]:withopen('../jieba-rs/examples/weicheng/src/weicheng.txt')asf:...:txt=f.read()...:In[7]:%timeitlist(jieba.cut(txt))1.1s±10.6msperloop(mean±std.dev.of7runs,1loopeach)In[8]:%timeitcjieba.cut(txt)225ms±3.95msperloop(mean±std.dev.of7runs,1loopeach)In[9]:%timeitrjieba.cut(txt)106ms±2.01msperloop(mean±std.dev.of7runs,10loopseach)
许可证
这部作品是在麻省理工学院授权下发布的。在LICENSE文件中提供了许可证的副本。在
- 项目
标签: