# Creating a data frame
tif <- data.frame(doc_id = c('1', '1', '2'),
sentence_id = c('1', '2', '1'),
text = c("Hello world.",
"This is an example.",
"This is a party!"))
chunks <- nlp_build_chunks(tif,
chunk_size = 2,
context_size = 1,
text_hierarchy = c('doc_id', 'sentence_id'))
Run the code above in your browser using DataLab