1.常規警告
import warnings
warnings.filterwarnings("ignore")
2.安裝gensim,在python中導入的時候出現一個警告:
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
UserWarning: detected Windows; aliasing chunkize to chunkize_serial
解決方法:輸入下面兩條語句即可:
import warnings warnings.filterwarnings(action='ignore',category=UserWarning,module='gensim')
