当前位置:网站首页>Please use the NLTK Downloader to obtain the resource

Please use the NLTK Downloader to obtain the resource

2022-06-23 04:42:00 Triumph19

Report errors

  • In the use of NLTK library , The following error has been reported .
LookupError:
**********************************************************************
  Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt')

  For more information see: https://www.nltk.org/data.html

  Attempted to load tokenizers/punkt/english.pickle

  Searched in:
    - 'C:\\Users\\hjh/nltk_data'
    - 'D:\\python3.9.12\\nltk_data'
    - 'D:\\python3.9.12\\share\\nltk_data'
    - 'D:\\python3.9.12\\lib\\nltk_data'
    - 'C:\\Users\\hjh\\AppData\\Roaming\\nltk_data'
    - 'C:\\nltk_data'
    - 'D:\\nltk_data'
    - 'E:\\nltk_data'
    - ''
**********************************************************************

Solutions

 link :https://pan.baidu.com/s/1xWG2yTXkmw3BFRuOXgS2jQ
 Extraction code :62xn
 Copy this content after opening baidu network disk mobile phone App, It is more convenient to operate 

Put the corpus in python File directory

  • First, unzip the downloaded compressed package , And then on python Under the table of contents , Execute the relevant command again , It can run normally .
     Insert picture description here
原网站

版权声明
本文为[Triumph19]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206222320509925.html