I am using the quanteda package in r for textual data analysis. I am interested in plotting some Keyword-in-context display using the kwic() command that is to useful to find multi-word expressions in tokens.
# Remove punctuation and symbols
toks_comments <- tokens(comments_corpus, remove_punct = TRUE, remove_symbols = TRUE, padding =
TRUE) %>%
tokens_remove(stopwords("spanish"), padding = TRUE)
# Get relevant keywords and phrases from dictionary
servicio <-
c("servicio","atencion","atención","personal","mesera","mesero","muchacha","muchacho","joven",
"pelado", "pelada","meseros")
# Keyword-in-context
servicio_context <- kwic(toks_comments, pattern = phrase(servicio))
View(servicio_context)
Once the previous lines have been run, I get the result that I have included in the photo. From that table in the photo, I am interested in graphing the "pre" and "post" column but I don't know how to do it. Is there a way to include the words in a multiword wordcloud or some other frequency visualization?
Here is the pic:"View(servicio_context)"