stemDocument | R Documentation |
Stem words in a text document using Porter's stemming algorithm.
## S3 method for class 'character'
stemDocument(x, language = "english")
## S3 method for class 'PlainTextDocument'
stemDocument(x, language = meta(x, "language"))
x |
A character vector or text document. |
language |
A string giving the language for stemming. |
The argument language
is passed over to
wordStem
as the name of the Snowball stemmer.
data("crude")
inspect(crude[[1]])
if(requireNamespace("SnowballC")) {
inspect(stemDocument(crude[[1]]))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.