Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种有效的方法来使用 NLTK 检查 A 是否是 WordNet 中 B 的下义词。
我可以lowest_common_hypernyms用来检查 A 和 B 的最低共同上位词是否是 B,这意味着 A 是 B 的下位词,但问题是 B 可能是 A 的下位词。
lowest_common_hypernyms
是否有任何单一功能可以检查这一点?
motorcar = wn.synset('car.n.01') types_of_motorcar = motorcar.hyponyms() types_of_motorcar[26]