Learn R Programming

birdnik (version 0.1.1)

related_words: Retrieve related words

Description

related_words grabs terms that are in some way associated with the words argument.

Usage

related_words(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 3 columns: word (the original term), type (the type of relationship) and related_word.

Examples

Run this code
# NOT RUN {
cat_adjacent <- related_words(key = "madeupkey", words = "cat")
# }

Run the code above in your browser using DataLab