stemDocument: Stem Words

View source: R/transform.R

stemDocumentR Documentation

Stem Words

Description

Stem words in a text document using Porter's stemming algorithm.

Usage

## S3 method for class 'character'
stemDocument(x, language = "english")
## S3 method for class 'PlainTextDocument'
stemDocument(x, language = meta(x, "language"))

Arguments

x

A character vector or text document.

language

A string giving the language for stemming.

Details

The argument language is passed over to wordStem as the name of the Snowball stemmer.

Examples

data("crude")
inspect(crude[[1]])
inspect(stemDocument(crude[[1]]))

tm documentation built on Dec. 28, 2022, 1:51 a.m.