摘要: 主要步骤:1.读取文件2.jieba分词3.写入文件完整代码如下:import jiebafR = open('gp.txt', 'r', encoding='UTF-8') //读取文件sent = fR.r... 阅读全文
posted @ 2020-02-13 20:21 HelenLee01 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 报错:module 'jieba' has no attribute 'cut'原因:文件名为 jieba.py解决办法:更改文件名拓展:初学者在学习的过程中有时会直接把文件命名为所学内容,恰好和import的包... 阅读全文
posted @ 2020-02-13 20:14 HelenLee01 阅读(317) 评论(0) 推荐(0) 编辑
摘要: python报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 14: illegal multibyte sequence... 阅读全文
posted @ 2020-02-13 19:48 HelenLee01 阅读(2022) 评论(0) 推荐(0) 编辑
摘要: 原因:pip安装包经常失败,原因是网速慢,国外服务器连接超时,默认15s解决办法:先下载,后安装1.打开 https://www.lfd.uci.edu/~gohlke/pythonlibs/ (里面有几乎所有... 阅读全文
posted @ 2020-02-13 10:48 HelenLee01 阅读(456) 评论(0) 推荐(0) 编辑