Use python to extract words and their antonyms from wordnet
see data-raw/generate-wordnet-antonyms.py
Process the wordnet list into an R data structure
see data-raw/create-r-antonyms-data.R
Included words_ant in the internal data for this package
Added ant() and ants()
Unfortunately, there aren't really a lot of words in this antonym dataset i.e.
syn('good') has 667 results
ant('good') has 2 results
However, if we first find the list of synonyms of 'good', and then find all the antonyms of everything in there, there are 268 antonyms i.e.
sort(unique(flatten_chr(ants(syn('good')))))
This isn't perfect - somehow 'good' is in this list of antonyms for 'good'!
So for now, I've just included the wordnet antonyms as-is.
I've included the wordnet list as it is output by python (data-raw/wordnet-antonyms-cleaned.txt), as it's probably unreasonable to expect anyone to regenerate this.
data-raw/generate-wordnet-antonyms.py
data-raw/create-r-antonyms-data.R
words_ant
in the internal data for this packageant()
andants()
Unfortunately, there aren't really a lot of words in this antonym dataset i.e.
syn('good')
has 667 resultsant('good')
has 2 resultsHowever, if we first find the list of synonyms of 'good', and then find all the antonyms of everything in there, there are 268 antonyms i.e.
This isn't perfect - somehow 'good' is in this list of antonyms for 'good'!
So for now, I've just included the wordnet antonyms as-is.
I've included the wordnet list as it is output by python (
data-raw/wordnet-antonyms-cleaned.txt
), as it's probably unreasonable to expect anyone to regenerate this.