jieba 分词不显示日志
2019-06-27 09:58 JohnRain 阅读(1590) 评论(0) 编辑 收藏 举报问题
每一次我用jieba进行分词的时候,都会有
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.128 seconds.
Prefix dict has been built succesfully.
这样的提示。怎么去除这些提示呢?
解决方案
import logging
jieba.setLogLevel(logging.INFO)
或
jieba.setLogLevel(20)