Learn R Programming

birdnik (version 0.1.1)

word_pronunciations: Retrieve Pronunciations for Words

Description

word_pronunciations grabs, well, pronunciations for a series of words.

Usage

word_pronunciations(key, words, use_canonical = FALSE, source_dicts = "all",
  pronunciation_type = "all", limit = 50, ...)

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.

pronunciation_type

the type of pronunciations to return, if available; options are "ahd", "IPA", "arpabet" and "gcide-diacritical". "all" (the default) provides any that are available.

limit

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

...

further arguments to pass to httr's GET.

Examples

Run this code
# NOT RUN {
cats_vs_dogs <- word_pronunciations(key = "fakekey", words = c("cat", "dog"))
# }

Run the code above in your browser using DataLab