Make a stemmer from a set of (term, stem) pairs.
character vector of terms to stem.
character vector the same length as
action to take for duplicates in the
whether to produce a vectorized stemmer that accepts and returns vector arguments.
Giving a list of terms and a corresponding list of stems, this produces a
function that maps terms to their corresponding entry. If
default = NULL, then values absent from the
get left as-is; otherwise, they get replaced by the
duplicates argument indicates the action to take if
there are duplicate entries in the
duplicates = "first" take the first matching entry in the
duplicates = "last" take the last matching entry in the
duplicates = "omit" use the
default value for
duplicates = "fail" raise an error if there are duplicated
By default, with
vectorize = TRUE, the resulting stemmer accepts a
character vector as input and returns a character vector of the same length
with entries giving the stems of the corresponding input entries.
vectorize = FALSE gives a function that accepts a single input
and returns a single output. This can be more efficient when used as part of
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.