Refine keywords by (1) dropping keywords that do not appear in the documents and (2) dropping topics that does not have any occurence in the documents.
refine_keywords(keywords, docs, prune = TRUE)a list of keywords
a keyATM_docs object, generated by keyATM_read() function
logical, whether to prune keywords that do not appear in the documents
a list of refined keywords
if (FALSE) { # \dontrun{
library(quanteda)
data(keyATM_data_bills)
bills_keywords <- keyATM_data_bills$keywords
bills_dfm <- keyATM_data_bills$doc_dfm # quanteda dfm object
keyATM_docs <- keyATM_read(bills_dfm)
bills_keywords$Videogame <- c("metroid", "castlevania", "balatro")
refine_keywords(bills_keywords, keyATM_docs)
} # }