Skip to content

mosegontar/rubymuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rubymuse

Rubymuse is a tiny api wrapper for the Datamuse API.

Installation

Add this line to your application's Gemfile:

gem 'rubymuse'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubymuse

Usage

To construct queries, pass query parameters as keyword arguments to Datamuse::words.

require('rubymuse')

# Find words with a meaning similar to the word 'programming'
Datamuse.words(ml: 'programming')

# Find words with a meaning similiar to the word 'programming' and related to the topic 'television'
Datamuse.words(ml: 'programming', topics: 'television') 

# Find words that rhyme with 'orange'
Datamuse.words(rel_rhy: 'orange')

# Find suggested words based on partial string 'prog'
Datamuse.sug(s: 'prog')

# Find suggested words in Spanish based on partial string 'prog'
Datamuse.sug(s: 'prog', v: 'es')

See Datamuse API for full documentation on Datamuse's query parameters and options.

Contributing

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

License

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