NLTK WordNet

Posted on 01.10.2017

  • WordNet Interface for NLTK
  • NLTK Data
  • Import wordnet from nltk.corpus import wordnet as wn
  • Loop through lemmas for l in synset.lemmas():
  • Lemma name as string str(lemma.name())
  • Antonyms synset.lemmas()[0].antonyms()
  • Install NLTK 3.0.0b1 pip install -Iv https://pypi.python.org/packages/source/n/nltk/nltk-3.0.0b1.tar.gz#md5=f3f67fcda9bc76f57d91811a572c36e4
  • Install nltk data: (1) python (2) import nltk (3) nltk.download()