strip_stopwords: Strip Stopwords

Description Usage Arguments Examples

View source: R/prepare.R

Description

Remove stopwords, or the words such as "all", "almost", "alone", (and many more).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
strip_stopwords(text)

## S3 method for class 'corpus'
strip_stopwords(text)

## S3 method for class 'documents'
strip_stopwords(text)

## S3 method for class 'document'
strip_stopwords(text)

Arguments

text

An object inheriting of class document or corpus.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
init_textanalysis()

# build document
# must be lowercase
doc <- string_document("The document has a stop word.")

# replaces in place!
strip_stopwords(doc)
get_text(doc)

## End(Not run)

news-r/textanalysis documentation built on Nov. 4, 2019, 9:40 p.m.