powered by
tokens_tolower and tokens_toupper convert the features of a tokens object and reindex the types.
tokens_tolower
tokens_toupper
tokens_tolower(x, keep_acronyms = FALSE, ...)tokens_toupper(x, ...)
tokens_toupper(x, ...)
the input object whose character/tokens/feature elements will be case-converted
logical; if TRUE, do not lowercase any all-uppercase words (applies only to *_tolower functions)
TRUE
*_tolower
additional arguments passed to stringi functions, (e.g. stri_trans_tolower), such as locale
stri_trans_tolower
locale
# NOT RUN { # for a document-feature matrix toks <- tokens(c(txt1 = "b A A", txt2 = "C C a b B")) tokens_tolower(toks) tokens_toupper(toks) # }
Run the code above in your browser using DataLab