Getting synonyms/antonyms from NLTK WordNet:

WordNet is large lexical database of English. Verbs, nouns, adverbs, and adjectives are all grouped into sets of cognitive synonyms. Each of these will express a distinct concept in python for data science. There is interlinking of synsets by means of conceptual-semantic and lexical relations.

The structure of WordNet makes it a useful tool for computational linguistics and natural language processing.

WordNet resembles a thesaurus and groups words according to its meaning. There are some distinctions:

  • WordNet not only interlinks word forms but also specifies the senses of the words. So, the words found in close proximity to one another in network are semantically disambiguated.
  • WordNet will label the semantic relations among words, but grouping of words in a thesaurus will not follow an explicit pattern other than meaning similarity.

Getting synonyms from NLTK WordNet in Python for Data Science

The lemmas will be the synonyms, and later we can use .antonyms for finding antonyms to lemmas. We can populate some lists like:

Getting synonyms from NLTK WordNet in Python for Data Science


Now we will compare the similarity index of any two words.

So, to learn more about it in python for data science, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.