R/get_hlda_features.R

Defines functions get_hLDA_features

#' @importFrom magrittr %>%
get_hLDA_features <- function(hLDA_model, all = FALSE) {
  if (all) v <- hLDA_model$vocabs else v <- hLDA_model$used_vocabs
  v %>%
    as.character() %>%
    stringr::str_remove("\\[") %>%
    stringr::str_remove("\\]") %>%
    stringr::str_remove_all("'") %>%
    stringr::str_split(., ", ") %>%
    unlist()
}
lasy/hLDA documentation built on June 15, 2024, midnight