word_definitions: Retrieve definitions of a word

Description Usage Arguments Value See Also Examples

View source: R/words.R

Description

word_definitions retrieves the overall metadata for each word in words, including actual definitions.

Usage

1
2
word_definitions(key, words, use_canonical = FALSE, source_dicts = "all",
  limit = 200, ...)

Arguments

key

a Wordnik API key. These can be obtained at the Wordnik developer portal.

words

a vector of words.

use_canonical

whether to use the stemmed, canonical form of the word (i.e. 'cat', for 'cats') instead of the actual word. FALSE by default. Note that for pronunciations specifically, setting it to TRUE may get a wider range of pronunciations; you should experiment.

source_dicts

the dictionaries to use; options are any permutation of "ahd", "century", "wiktionary", "wordnet" and "webster". "all" (the default) searches all of them.

limit

the maximum number of items to return for any one word.

...

further arguments to pass to httr's GET.

Value

a list structure containing definitions for each word in words, along with associated metadata, which can be manipulated with birdnik_get.

See Also

birdnik_get for ways to conveniently access individual chunks of the returned dataset.

Examples

1
2
3
4
## Not run: 
cats <- word_definitions(key = "madeupkey", words = "cat")

## End(Not run)

birdnik documentation built on May 27, 2018, 5:04 p.m.