Learn R Programming

NLPutils (version 0.0-5.1)

stem: Word Stem Annotator

Description

Generate an annotator which computes word stem annotations using wordStem() from package SnowballC.

Usage

Snowball_Stem_Annotator(language = "porter")

Value

A Annotator object giving the generated word stem annotator.

Arguments

language

a character string giving the document language. See the documentation for wordStem() for more information.

Examples

Run this code
require("NLP")
doc <- readRDS(system.file("texts", "stanford.rds", package = "NLP"))
s <- content(doc)
a <- annotation(doc)

stem_annotator <- Snowball_Stem_Annotator()
stem_annotator(s, a)

Run the code above in your browser using DataLab