《机器学习》一书第四章测试垃圾邮件出现编码错误

书中的程序 wordlist = textpare(open('email/spam/%d.txt'%i).read())



调试后

wordList = textParse(open('email/ham/%d.txt'% i,'r',encoding='UTF-8',errors='ignore').read())


猜你喜欢

转载自blog.csdn.net/weixin_42127577/article/details/80577730
今日推荐