Quote:
Originally Posted by Mr.mmmKay
Calm down
reg_words <- "([^A-Za-z_\\d#@']|'(?![A-Za-z_\\d#@]))"
mutate(text = str_replace_all(text, "https://t.co/[A-Za-z\\d]+|http://[A-Za-z\\d]+|&|<|>|RT|https", "")) %>%
unnest_tokens(word, text, token = "regex", pattern = reg_words) %>%
filter(!word %in% stop_words$word,punk,str_detect(word, "[a-z]"))