jieba 分词不显示日志
2019-06-27 09:58 JohnRain 阅读(1632) 评论(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)
浙公网安备 33010602011771号