Project

thesaurus

0.0
No commit activity in last 3 years
No release in over 3 years
Full-text thesaurus search, based on Grady Ward's Moby Project https://en.wikipedia.org/wiki/Moby_Project
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0
 Project Readme

Thesaurus

Look up English words in a thesaurus.

The thesaurus included is Grady Ward's Moby Project.

Installation

Add this line to your application's Gemfile:

gem 'thesaurus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install thesaurus

Usage

Thesarus.lookup(word): return a list of thesaurus entries that contain the word, either as their root or in the body.

entry.root: The root word (as a String)

entry.words: The entry body, as an array of String.

require 'thesaurus'

entries = Thesaurus.lookup("bacon")
entries.each do |entry|
  puts "Root word: #{entry.root}"
  puts "Words: #{entry.words.join(", ")}"
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pbevin/thesaurus.

License

The gem is available as open source under the terms of the MIT License.