tidymodels, textrecipes, and n-gram models

I was looking to build a n-gram prediction model with tidymodels and came across textrecipes which looks very helpful.

I set up a few steps like step_tokenize() and step_ngram(), but I'm stuck wondering if there's any way I can define the recipe to build the data set to be features [first word, second word], then the predicted class being the third word. I think I may need to build this more manually but wanted to see if anyone has any suggestions on if this is currently possible. Thanks for any advice.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.