Skip to content
Advertisement

Is there a way to find the antonym(word with the opposite meaning) of a word with python? Do you know a dataset or an nlp toolkit?

right-wing extremism -> left-wing extremism

Thank you for your help!

Advertisement

Answer

NLTK is the main library for NLP and it includes many corpora. See the code here: How to generate a list of antonyms for adjectives in WordNet using Python

NLTK documentation on using WordNet: https://www.nltk.org/howto/wordnet.html

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement