powered by
Load a BERTopic model saved with save_bertopic_model() along with its companion RDS file containing R-side extras.
save_bertopic_model()
load_bertopic_model(path, embedding_model = NULL)
A list with two elements: model (the BERTopic model) and extras
model
extras
(the R-side data saved in the companion RDS file).
Directory path where the Python model was saved.
Optional embedding model to pass through to BERTopic$load() when the embedding model is not serialized.
BERTopic$load()
# \donttest{ if (dir.exists("topic_model")) { loaded <- load_bertopic_model("topic_model") print(loaded$extras) } else { message("No saved model found at 'topic_model'.") } # }
Run the code above in your browser using DataLab