# by default, sentopics_labels() generate standard topic names
lda <- LDA(ECB_press_conferences_tokens)
sentopics_labels(lda)
# to change labels, a named list must be provided
sentopics_labels(lda) <- list(
topic = paste0("superTopic", 1:lda$K)
)
sentopics_labels(lda)
# using NULL remove labels
sentopics_labels(lda) <- NULL
sentopics_labels(lda)
# also works for JST/rJST models
jst <- JST(ECB_press_conferences_tokens)
sentopics_labels(jst) <- list(
topic = paste0("superTopic", 1:jst$K),
sentiment = c("negative", "neutral", "positive")
)
sentopics_labels(jst)
# setting flat = FALSE return a list or labels for each dimension
sentopics_labels(jst, flat = FALSE)
Run the code above in your browser using DataLab