porter_stemmer: Porter Stemmer

Description Usage Arguments Examples

View source: R/parsing.R

Description

The Porter stemming algorithm (or ‘Porter stemmer’) is a process for removing the commoner morphological and inflexional endings from words in English. Its main use is as part of a term normalisation process that is usually done when setting up Information Retrieval systems.

Usage

1
2
3
4
5
6
porter_stemmer()

stem_porter(stemmer, text)

## S3 method for class 'porter_stemmer_model'
stem_porter(stemmer, text)

Arguments

stemmer

A porter stemmer as returned by porter_stemmer.

text

Text to parse.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# create model
stemmer <- porter_stemmer()

# stem
stemmer$stem("survey")
# or convenience method
stem_porter(stemmer, "survey")

## End(Not run)

news-r/gensimr documentation built on Jan. 9, 2021, 5:55 a.m.