Learn R Programming

tm (version 0.5-9.1)

stemDocument: Stem Words

Description

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

Usage

## S3 method for class 'PlainTextDocument':
stemDocument(x, language = Language(x))

Arguments

x
A text document.
language
A character setting the language to be used for stemming.

Details

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

Examples

Run this code
data("crude")
crude[[1]]
stemDocument(crude[[1]])

Run the code above in your browser using DataLab