# NOT RUN {
txt <- c(doc1 = "The quick brown fox jumped over the lazy dog.",
doc2 = "The dog jumped and ate the fox.")
toks <- tokenize(char_tolower(txt), remove_punct = TRUE)
toksHashed <- tokens_hash(toks)
toksHashed
# returned as a list
as.list(toksHashed)
# returned as a tokenized Text
as.tokenizedTexts(toksHashed)
# change case
toks <- tokens_hash(tokenize(c(one = "a b c d A B C D",
two = "A B C d")))
# }
Run the code above in your browser using DataLab