Learn R Programming

tidytext (version 0.4.2)

get_stopwords: Get a tidy data frame of a single stopword lexicon

Description

Get a specific stop word lexicon via the stopwords package's stopwords function, in a tidy format with one word per row.

Usage

get_stopwords(language = "en", source = "snowball")

Value

A tibble with two columns, word and lexicon. The parameter lexicon is "quanteda" in this case.

Arguments

language

The language of the stopword lexicon specified as a two-letter ISO code, such as "es", "de", or "fr". Default is "en" for English. Use stopwords_getlanguages from stopwords to see available languages.

source

The source of the stopword lexicon specified. Default is "snowball". Use stopwords_getsources from stopwords to see available sources.

Examples

Run this code
if (FALSE) { # rlang::is_installed("stopwords")

library(dplyr)
get_stopwords()
get_stopwords(source = "smart")
get_stopwords("es", "snowball")
get_stopwords("ru", "snowball")
}

Run the code above in your browser using DataLab