最近尝试的文本分类模型

环境搭建报错处理

  1. scipy的该方法,在新版本中被删除。回到旧版本

"ImportError: cannot import name 'triu' from 'scipy.linalg'" when importing Gensim

处理:

python - "ImportError: cannot import name 'triu' from 'scipy.linalg'" when importing Gensim - Stack Overflow

以下方法任选其一即可

  • pip install scipy==1.10.1

  • pip install scipy==1.12

  • conda install "scipy<1.13"


  1. 缺模块

    • 缺少openpyxl

      • 处理:

        • conda install openpyxl -y

        • 或者 pip install openpyxl -y

    • ModuleNotFoundError: No module named 'xlrd'

      • 处理:conda install xlrd -y

    • conda install pytables


  1. 缺少stoplist.txt

    FileNotFoundError: [Errno 2] No such file or directory: 'stoplist.txt'

处理:从老师学习通下载stopword.txt,然后复制到.py文件相同的文件夹中,并改名stoplist.txt


  1. 字典问题

python使用结巴中文分词以及训练自己的分词词典 - pytorch中文网

找到一个别人的字典下载链接https://github.com/fxsjy/jieba/raw/master/extra_dict/dict.txt.small

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值