Extract term embeddings from an embedded topic model (ETM).
Value
A data.table with one row per term,
a term column, and one column per embedding dimension named dim_001,
dim_002, and so on.
Examples
if (FALSE) { # requireNamespace("topicmodels.etm", quietly = TRUE) && requireNamespace("torch", quietly = TRUE) && torch::torch_is_installed()
path <- system.file(package = "topicmodels.etm", "example", "example_etm.ckpt")
model <- torch::torch_load(path)
get_term_embeddings(model)
}
