Skip to content

Instantly share code, notes, and snippets.

@billhsia
Created January 13, 2020 07:56
Show Gist options
  • Save billhsia/4659e73786e2a9dfcd6eb53c0167b692 to your computer and use it in GitHub Desktop.
Save billhsia/4659e73786e2a9dfcd6eb53c0167b692 to your computer and use it in GitHub Desktop.
from nltk.corpus import wordnet as wn
tartget_synset = wn.synset_from_pos_and_offset('n', int(2084071))
print(tartget_synset) # synset
print(tartget_synset.lemma_names()) # 同義詞
print(tartget_synset.definition()) # definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment