Learn R Programming

tm (version 0.3-3)

stemCompletion: Complete Stems

Description

Heuristically complete stemmed words.

Usage

stemCompletion(object, words, type = c("prevalent", "first"))

Arguments

object
a Corpus to be searched for possible completions.
words
a character vector of stems to be completed.
type
a character naming the heuristics to be used. prevalent is default and takes the most frequent match as completion, whereas first takes the first found completion.

Value

  • A character vector with completed words.

Examples

Run this code
data("crude")
stemCompletion(crude, c("compan", "entit", "suppl"))

Run the code above in your browser using DataLab