Learn R Programming

birdnik (version 0.1.1)

get_pos: Extract components from word metadata

Description

these functions allow you to extract particular components from wordnik definitions; get_pos the unique parts-of-speech, get_text the unique definitions for each word, and get_score the unique word scores.

Usage

get_pos(results)

get_text(results)

get_score(results)

Arguments

results

the results of a call to word_definitions.

Value

a data.frame of two columns - word (containing the word) and a second column of score, text or part_of_speech depending on the function you called.

Examples

Run this code
# NOT RUN {
# Retrieve the unique parts-of-speech for 'no' and 'kings'
no_kings <- word_definitions(key = "madeupkey", words = c("no", "kings"))
get_pos(no_kings)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab