Usage (from terminal):
ruby datamuse.rb <query> <keyword> <query> <keyword> # etc...
*Requires a minimum of two arguments (i.e. one query-keyword pair)
NOTE: Datamuse API response will be written to the file specified in config.yml
as JSON, relative to the current working directory.
related
: Words related tokeyword
synonym
: Synonyms ofkeyword
antonym
: Antonyms ofkeyword
sound
: Words that sound similar tokeyword
rhyme
: Words that rhyme withkeyword
describe
: Adjectives often used to describekeyword
describe_by
: Nouns often described bykeyword
prefix
: Words that start withkeyword
suffix
: Words that end withkeyword
spelling
: Spelled like the given expression (?
= wildcard,*
= multiple wildcard)(ex.t??e
,*graphy
)follow
: Words that often followkeyword
precede
: Words that often precedekeyword
general
: Words that are more general thankeyword
specific
: Words that are more specific thankeyword
comprise
: Words thatkeyword
comprisespart
: Parts of akeyword
topic
/sort
: Sort results by a topickeyword
trigger
/associated
: Words triggered bykeyword
homophone
: Homophones ofkeyword
max
: Set the maximum number of results to receive from the API call
Words related to fish and start with "tr"
ruby datamuse.rb related fish prefix t
# => [ "trout", "tributaries", "troll", "tripletail", "truttaceous", ...] >> datamuse_output.json
Words that rhyme with cake, related to dessert
ruby datamuse.rb rhyme cake related dessert
# => [ "steak", "bake", "pancake", "cupcake", "cheesecake", ...] >> datamuse_output.json
Adjectives used to describe fruit, sorted by color
ruby datamuse.rb describe fruit sort color
# => ["colored", "purple", "red", "yellow", "luscious", "scarlet", ...] >> datamuse_output.json