remove_words: Remove Specific Words

Description Usage Arguments Examples

View source: R/prepare.R

Description

Remove specific words.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
remove_words(text, words)

## S3 method for class 'corpus'
remove_words(text, words)

## S3 method for class 'documents'
remove_words(text, words)

## S3 method for class 'document'
remove_words(text, words)

Arguments

text

An object inheriting of class document or corpus.

words

Word to remove.

Examples

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

# build document
doc <- string_document("this woops is not woop correct")

# replaces in place!
errors <- c("woops", "woop")
remove_words(doc, words = errors)
get_text(doc)

## End(Not run)

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