Learn R Programming

BERTopic (version 0.1.0)

bertopic_set_embedding_model: Replace or set the embedding model

Description

Set a new embedding model on a fitted BERTopic instance. This enables transform() after loading when the embedding model was not saved.

Usage

bertopic_set_embedding_model(model, embedding_model)

Value

The input model (invisibly).

Arguments

model

A "bertopic_r" model.

embedding_model

Either a character identifier (e.g., "all-MiniLM-L6-v2") or a Python embedding model object (e.g., a SentenceTransformer instance).