提示:文本用于学习记录
前言
- 问题1:pycharm 报错 SyntaxError: Non-UTF-8 code starting with ‘\xe6’ in file 问题解决
- 问题2:UserWarning:您的 stop_words 可能与您的预处理不一致问题解决
问题1
- pycharm 报错 SyntaxError: Non-UTF-8 code starting with ‘\xe6’ in file 问题解决
解决办法
- 代码最上面加上编码格式:#coding:utf-8 即可
问题2
- UserWarning: Your stop_words may be inconsistent with your preprocessing
(您的 stop_words 可能与您的预处理不一致问题解决)
解决办法
- 可使用以下命令取消所有警告
- import warnings
- warnings.filterwarnings(“ignore”)
总结
以上就是 pycharm 报错 SyntaxError: Non-UTF-8 code starting with ‘\xe6‘ in file 与 UserWarning:您的 stop_words 可能与您的预处理不一致问题解决这两个问题的解决办法。