Introducing the english_thesaurus gem

The english_thesaurus gem fetched synonyms from http://thesaurus.com/

Installation

gem install english_thesaurus

Usage

require 'english_thesaurus'

def synonym(word)
  EnglishThesaurus::Thesaurus.new(word.to_s)
    .synonyms(relevancy: :high)[0][:high_relevance_list]
end

alias syn synonym


syn :angry
#=> ["enraged", "resentful", "offended", "irritable", "impassioned", "irate", "uptight", "sullen", "heated", "furious", "irritated", "bitter", "annoyed", "indignant", "exasperated", "outraged"] 

syn :happy
#=> ["cheerful", "contented", "overjoyed", "ecstatic", "elated", "joyous", "delighted", "pleased", "pleasant", "lively", "merry", "peaceful", "upbeat", "joyful", "glad", "jubilant", "thrilled"]

syn :phone
#=> ["dial", "contact", "call up"] 


## Resources