Learn R Programming

RcmdrPlugin.temis (version 0.6.1)

stemDocumentSnowballC: Stem Words using SnowballC

Description

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

Usage

## S3 method for class 'PlainTextDocument':
stemDocumentSnowballC(x, language = Language(x))
## S3 method for class 'character':
stemDocumentSnowballC(x, language = "porter")

Arguments

x
A text document or a character vector.
language
A character setting the language to be used for stemming. Must be one of the values returned by getStemLanguages, or a corresponding ISO-639 two- or three-lett

Details

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

Examples

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

if(require(SnowballC))
stemDocumentSnowballC(crude[[1]])

Run the code above in your browser using DataLab