问题:
在pycharm中导入thulac分词的时候,出现了报错:
AttributeError: module ‘time’ has no attribute ‘clock’
原因:
我是用的是Python3.9,已经不支持time.clock()了, 将其替换成time.pref_counter()就可以解决问题。
解决方案:
按照上方第一张图片箭头所示,点击并修改文件:CBTaggingDecoder.py,将其中的
start = time.clock()
修改为:
start = time.perf_counter()
搞定!