sents <- c("I like chicken.", "I want eggs Benedict for breakfast.")
count_vector(sents)
Map(function(x, y) setNames(x, y),
count_vector(sents),
strsplit(gsub("[^a-z ]", "", tolower(sents)), "\\s+")
)
count_vector(presidential_debates_2012$dialogue)
Run the code above in your browser using DataLab