Learn R Programming

ptstem (version 0.0.7)

stem_hunspell: Stemming using Hunspell

Description

This function uses Hunspell Stemmer to stem a vector of words. It uses the (Portuguese Brazilian) dictionary by default, and unlike hunspell::hunspell_stem it returns only one stem per word.

Usage

stem_hunspell(words, complete = TRUE)

Arguments

words

character vector of words to be stemmed

complete

wheter words must be completed or not (T)

Details

As hunspell_stem can return a list of stems for each word, the function takes the stems that appears the most in the vector for each word.

Examples

Run this code
# NOT RUN {
words <- c("bal<U+00F5>es", "avi<U+00F5>es", "avi<U+00E3>o", "gostou", "gosto", "gostaram")
ptstem:::stem_hunspell(words)

# }

Run the code above in your browser using DataLab