Skip to contents

Preprocess text for analysis

Usage

preprocess_text(text)

Arguments

text

A character string to be preprocessed

Value

A preprocessed character string

Details

This function preprocesses the input text by converting to lowercase, removing punctuation and digits, and trimming whitespace.

Examples

text <- "Hello, World! This is an example text (with 123 numbers)."
preprocess_text(text)
#> [1] "hello world this is an example text with numbers"