raw_text <- c(
"This is a test! Visit https://example.com",
"Email me at test.user@example.org [important]"
)
# Basic preprocessing with defaults
clean_text <- pre_process(raw_text)
print(clean_text)
# Keep punctuation and stopwords
clean_text_no_stop <- pre_process(
raw_text,
remove_stop_words = FALSE,
remove_punct = FALSE
)
print(clean_text_no_stop)
Run the code above in your browser using DataLab