https://github.com/bnosac/crfsuite/blob/master/vignettes/crfsuite-nlp.Rmd#L98
should be
x <- x[, token_next := txt_sprintf("token[w+1]=%s", token_next), by = list(doc_id)] instead of
x <- x[, token_next := txt_sprintf("token[w-1]=%s", token_next), by = list(doc_id)]
https://github.com/bnosac/crfsuite/blob/master/vignettes/crfsuite-nlp.Rmd#L98
should be
x <- x[, token_next := txt_sprintf("token[w+1]=%s", token_next), by = list(doc_id)]instead ofx <- x[, token_next := txt_sprintf("token[w-1]=%s", token_next), by = list(doc_id)]