preprocess: Preprocess text corpus

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

A simple text preprocessing utility.

Usage

1
preprocess(input, erase = "[^.?!:;'\\w\\s]", lower_case = TRUE)

Arguments

input

a character vector.

erase

a length one character vector. Regular expression matching parts of text to be erased from input. The default removes anything not alphanumeric, white space, apostrophes or punctuation characters (i.e. ".?!:;").

lower_case

a length one logical vector. If TRUE, puts everything to lower case.

Value

a character vector containing the processed output.

Author(s)

Valerio Gherardi

Examples

1
preprocess("Hi @ there! I'm using `sbo`.")

sbo documentation built on Dec. 6, 2020, 1:06 a.m.