preprocess: Preprocess text

Description Usage Arguments Filters

View source: R/parsing.R

Description

Remove stopwords from a character string.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
preprocess(s, ..., filters = c("strip_tags", "strip_punctuation",
  "strip_multiple_spaces", "strip_numeric", "remove_stopwords",
  "strip_short", "stem_text"), to_lower = TRUE)

## S3 method for class 'character'
preprocess(s, ..., filters = c("strip_tags",
  "strip_punctuation", "strip_multiple_spaces", "strip_numeric",
  "remove_stopwords", "strip_short", "stem_text"), to_lower = TRUE)

## S3 method for class 'list'
preprocess(s, ..., filters = c("strip_tags",
  "strip_punctuation", "strip_multiple_spaces", "strip_numeric",
  "remove_stopwords", "strip_short", "stem_text"), to_lower = TRUE)

## S3 method for class 'data.frame'
preprocess(s, text, ..., filters = c("strip_tags",
  "strip_punctuation", "strip_multiple_spaces", "strip_numeric",
  "remove_stopwords", "strip_short", "stem_text"), to_lower = TRUE)

Arguments

s

A Character string or data.frame.

...

Any other options.

filters

Filters to apply, see filter section.

to_lower

Whether to convert to lowercase before processing.

text

bare name of text column.

Filters


news-r/gensimr documentation built on Jan. 9, 2021, 5:55 a.m.