if (FALSE) {
library(recipes)
short_data <- data.frame(text = c(
"This is a short tale,",
"With many cats and ladies."
))
rec_spec <- recipe(~text, data = short_data) %>%
step_tokenize(text, engine = "spacyr") %>%
step_lemma(text) %>%
step_tf(text)
rec_prepped <- prep(rec_spec)
bake(rec_prepped, new_data = NULL)
}
Run the code above in your browser using DataLab