string_stem_group: Stem all words in a group.

Description Usage Arguments Details Value Examples

View source: R/string_stem_group.R

Description

Take a character vector of groups of words, and stem all words in each group. The results are collapsed back into the original grouping, with words separated by a single whitespace. This function wraps SnowballC::wordStem() which can only handle single words as input.

Usage

1

Arguments

string

A character vector containing strings of 1 or more words.

language

Passed to SnowballC::wordStem(), see SnowballC::getStemLanguages().

Details

Designed to take cleaned strings (see string_clean()) as input.

Value

string, with all individual words stemmed, collapsed back into the original groups of words

Examples

1
string_stem_group(c("The coolest words", "Will all be stemmed"), "english")

thorepet/thoremisc documentation built on Oct. 8, 2021, 7:48 a.m.