/nltk_data

Install using NLTK downloader: nltk.download()

The server used by the customer's development environment cannot connect to the external network, but we need to use NLTK on this Linux server, because it cannot be connected to the Internet and can only be installed offline.

  1. Go to Github to download first, and click download zip in clone or download on the right. The installation package is a bit big, don't worry.

  2. Created a nltk_data folder in the Searched in: any directory mentioned above (I was in the first directory) (it was not in the initial directory), and then copied the downloaded corpora folder to this directory.

  3. Try again, it worked!

  4. If you have any questions or other methods, please communicate in the comment area.

客户的开发环境使用的服务器无法连接到外部网络,但是我们需要在此Linux服务器上使用NLTK,因为它无法连接到Internet,并且只能脱机安装。

1.转到Github首先下载,然后单击克隆中的下载zip或在右侧下载。 安装包有点大,不用担心。

2.在上述搜索到的目录中创建一个nltk_data文件夹(我在第一个目录中)(该目录不在初始目录中),然后将下载的corpora文件夹复制到该目录中。

3.再次尝试,成功了!

4.如果你还有问题或者其他的方法,欢迎在评论区交流。