当前位置:   article > 正文

深度学习_NLP常用库报错问题解决

深度学习_NLP常用库报错问题解决

1、SpaCy

can‘t find model ‘zh_core_web_sm‘. It doesn‘t seem to be a python package or a valid path to a data

或者

can‘t find model ‘en_core_web_sm‘. It doesn‘t seem to be a python package or a valid path to a data

安装最新的版本:

en_core_web_sm ·发布 ·爆炸/空间模型 (github.com)

zh_core_web_sm · Releases · explosion/spacy-models (github.com)

  1. pip install zh_core_web_sm-3.7.0.tar.gz
  2. pip install en_core_web_sm-3.7.1.tar.gz

 

2、nltk

LookupError: 
**********************************************************************
  Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt')
  
  For more information see: NLTK :: Installing NLTK Data

  Attempted to load tokenizers/punkt/PY3/english.pickle

  Searched in:
    - '/root/nltk_data'
    - '/root/miniconda3/nltk_data'
    - '/root/miniconda3/share/nltk_data'
    - '/root/miniconda3/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
    - ''
**********************************************************************

 nltk/nltk_data:NLTK 数据 (github.com)

将其解压缩,连同tokenizers文件夹放至报错的任一目录下即可 

3、paddle、ddparser

解决ModuleNotFoundError: No module named ‘paddle‘

  1. CPU版
  2. python -m pip install paddlepaddle==2.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
  3. GPU版
  4. python -m pip install paddlepaddle-gpu==2.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/351824
推荐阅读
相关标签
  

闽ICP备14008679号