word_top_example: Retrieve a Word's Top Example

Description Usage Arguments Value Examples

View source: R/words.R

Description

word_top_example grabs, as it suggests, the top example for each entry in words.

Usage

1
word_top_example(key, words, use_canonical = FALSE, ...)

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.

...

further arguments to pass to httr's GET.

Value

a data.frame of 5 columns; provider, year, rating, word and example.

Examples

1
2
3
4
## Not run: 
examples <- word_top_example(key = "madeupkey", words = c("cat", "dog", "turnip"))

## End(Not run)

Example output

Loading required package: httr

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