文本提供最后案例的文档下载:https://download.youkuaiyun.com/download/qq_19741181/10278764
-----------------------------------------------------------------------------------------------
效果
>>> import jieba
>>> import jieba.analyse
>>> f = open('E:/cipin.txt','r')
>>> lines = f.readlines()
>>> text = ''
>>> for line in lines:
... text += line
...
>>> tags = jieba.analyse.extract_tags(text,topK = 20)
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\oil\AppData\Local\Temp\jieba.cache
Loading model cost 0.916 seconds.
Prefix dict has been built succesfully.
>>> print("\n".join(tags))
深圳大学
关于
行政
校园
2018
3.9
3.8
3.7
通知
校史馆
普通本科
三八节
高级职称
展陈
>>> import matplotlib.