njtierney / syn

syn - the thesaurus
http://syn.njtierney.com/
51 stars 4 forks source link

antonyms from wordnet #20

Closed coolbutuseless closed 5 years ago

coolbutuseless commented 5 years ago
  1. Use python to extract words and their antonyms from wordnet
    • see data-raw/generate-wordnet-antonyms.py
  2. Process the wordnet list into an R data structure
    • see data-raw/create-r-antonyms-data.R
  3. Included words_ant in the internal data for this package
  4. Added ant() and ants()

Unfortunately, there aren't really a lot of words in this antonym dataset i.e.

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.

njtierney commented 5 years ago

This is AWESOME!

Thanks, Mike! (@coolbutuseless) - this is cool AND useful! :)

I'm really happy with this, we can improve upon this in the future.