如何在执行 nltk.download() 时获取特定版本的 Wordnet

How to fetch a specific version of Wordnet when doing nltk.download()

我有一个域映射文件,用于通过偏移量链接的 Wordnet 同义词集,来自:- link

这两种类型的数据库针对不同的Wordnet 版本和其他显着差异。自述文件说

- "wn-domains-3.2-20070223" contains the mapping between Princeton WordNet 2.0 synsets and their corresponding domains.

我在 linux 机器上使用 python3.4 和 Wordnet 版本 3。我似乎无法找到支持 Wordnet 3 的任何其他版本的域文件,因此我需要将 Wordnet 降级到版本 2。我该怎么做?这甚至可能吗?

您应该将您的资源迁移到当前版本的 Wordnet,而不是尝试回滚 nltk——当然,如果其他项目依赖项不妨碍的话。 wordnet website provides a downloadable "sense-key mapping from version 2.1 to 3.0" (tgz archive) that you can use to migrate your domain file to Wordnet 3.0. Each version of Wordnet contains a similar migration table from the previous version, e.g. from 2.0 to 2.1(显然你需要)等