赞
踩
import jiagu
import jieba
import time
text = "183014-山西省脑瘫康复医院_2019年_2019年度行政事业单位国有资产报表"
t = time.time()
words = jiagu.seg(text)
t1 = time.time()
print(words)
print(t1-t)
t2 = time.time()
word = jieba.lcut(text, cut_all=False)
t3 = time.time()
print(word)
print(t3-t2)
jiagu的结果:
Building prefix dict from the default dictionary …
Loading model from cache C:\Users\clt0223\AppData\Local\Temp\jieba.cache
[‘183014’, ‘-’, ‘山西省’, ‘脑瘫’, ‘康复’, ‘医院’, ‘’, ‘2019’, ‘年’, '’, ‘2019’, ‘年度’, ‘行政’, ‘事业单位’, ‘国有资产’, ‘报表’]
0.5056478977203369
jieba的结果:
Loading model cost 0.619 seconds.
[‘183014’, ‘-’, ‘山西省’, ‘脑瘫’, ‘康复’, ‘医院’, ‘’, ‘2019’, ‘年’, '’, ‘2019’, ‘年度’, ‘行政’, ‘事业单位’, ‘国有资产’, ‘报表’]
Prefix dict has been built successfully.
0.6203413009643555
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。