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

  1. 打开cmd,输入python进入python命令行:

  2. 输入如下指令:

    import nltk
    nltk.download()

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

  3. 之后会弹出这个界面:选择Models选项卡,找到punkt选项,选择Download下载下来;
    NLTK:Resource punkt not found. Please use the NLTK Downloader to obtain the resource

  4. 回去重新运行文件,就不会报错啦~