How to get word hierarchy (e.g., hypernyms, hyponyms) using wordnet in R
问题 I want to use the wordnet package in R to get the word hierarchies like: "animal" is the hypernym of "cat", and "apple" is the hyponym of "fruit". But the code I can find from R wordnet help file is like below to identify antonyms: install.packages("wordnet", dependencies=TRUE) library(wordnet) filter <- getTermFilter("ExactMatchFilter", "cold", TRUE) terms <- getIndexTerms("ADJECTIVE", 5, filter) synsets <- getSynsets(terms[[1]]) related <- getRelatedSynsets(synsets[[1]],"!") sapply(related,