Optionally removes stopwords, numbers, ordinals, whitespaces, punctuation, diacritics, and convert to lower case.

clearPt(
  string,
  lower = TRUE,
  stopwords = TRUE,
  diacritics = TRUE,
  punctuation = TRUE,
  squish = TRUE,
  numbers = TRUE,
  ordinal = TRUE
)

Arguments

string

object to be submitted to conversion and removals.

lower

logical Converts to lower case.

stopwords

logial Removes portuguese-BR stopwords.

diacritics

logial remove all diacritics

punctuation

logical Romoves punctuation.

squish

logical applies stringr::str_squish

numbers

logical Removes numbers

ordinal

logical Removes ordinal superscripts

Examples

if (FALSE) { clearPt(texto) }