Tokenises text (splitting on whitespace, lower-casing, and stripping
punctuation), removes stop words, and counts term frequency. Ships a
small built-in English stop-word list so this works with zero optional
packages; pass stop_words = character(0) to disable filtering, or a
custom vector to override it.
Arguments
- text
Character vector of responses (raw or already cleaned by
clean_text_responses()).- stop_words
Character vector of words to exclude, or
NULLto use the built-in English list, orcharacter(0)for no filtering.- top_n
Integer. Maximum number of terms to return, most frequent first. Default
30.