Learn R Programming

textstem (version 0.1.4)

lemmatize_words: Lemmatize a Vector of Words

Description

Lemmatize a vector of words.

Usage

lemmatize_words(x, dictionary = lexicon::hash_lemmas, ...)

Arguments

x

A vector of words.

dictionary

A dictionary of base terms and lemmas to use for replacement. The first column should be the full word form in lower case while the second column is the corresponding replacement lemma. The default uses hash_lemmas. This may come from make_lemma_dictionary as well, giving a more targeted, smaller dictionary. make_lemma_dictionary has choices in engines to use for the lemmatization.

ignored.

Value

Returns a vector of lemmatized words.

See Also

lemmatize_strings

Examples

Run this code
# NOT RUN {
x <- c("the", NA, 'doggies', ',', 'well', 'they', "aren\'t", 'Joyfully', 'running', '.')
lemmatize_words(x)
# }

Run the code above in your browser using DataLab