stemCompletion: Complete Stems

View source: R/complete.R

stemCompletionR Documentation

Complete Stems

Description

Heuristically complete stemmed words.

Usage

stemCompletion(x,
               dictionary,
               type = c("prevalent", "first", "longest",
                        "none", "random", "shortest"))

Arguments

x

A character vector of stems to be completed.

dictionary

A Corpus or character vector to be searched for possible completions.

type

A character naming the heuristics to be used:

prevalent

Default. Takes the most frequent match as completion.

first

Takes the first found completion.

longest

Takes the longest completion in terms of characters.

none

Is the identity.

random

Takes some completion.

shortest

Takes the shortest completion in terms of characters.

Value

A character vector with completed words.

References

\bibshow

Feinerer:2010

Examples

data("crude")
stemCompletion(c("compan", "entit", "suppl"), crude)

tm documentation built on Oct. 1, 2026, 1:06 a.m.