MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / import_wordnet

Method import_wordnet

python/graphvite/dataset.py:893–904  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

891 )
892
893 def import_wordnet(self):
894 import nltk
895 try:
896 nltk.data.find("corpora/wordnet")
897 except LookupError:
898 nltk.download("wordnet")
899 from nltk.corpus import wordnet
900 try:
901 wordnet.synset_from_pos_and_offset
902 except AttributeError:
903 wordnet.synset_from_pos_and_offset = wordnet._synset_from_pos_and_offset
904 return wordnet
905
906 def get_name(self, synset):
907 name = synset.name()

Callers 1

readable_labelMethod · 0.95

Calls 1

downloadMethod · 0.80

Tested by

no test coverage detected