lemmatize_words: Lemmatize a Vector of Words

Description Usage Arguments Value See Also Examples

View source: R/lemmatize.R

Description

Lemmatize a vector of words.

Usage

1
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

1
2
x <- c("the", NA, 'doggies', ',', 'well', 'they', "aren\'t", 'Joyfully', 'running', '.')
lemmatize_words(x)

Example output

 [1] "the"      NA         "doggy"    ","        "good"     "they"    
 [7] "aren't"   "Joyfully" "run"      "."       

textstem documentation built on May 2, 2019, 6:42 a.m.