MCPcopy
hub / github.com/MaartenGr/BERTopic / __init__

Method __init__

bertopic/backend/_word_doc.py:10–14  ·  view source on GitHub ↗
(self, embedding_model, word_embedding_model)

Source from the content-addressed store, hash-verified

8 """Combine a document- and word-level embedder."""
9
10 def __init__(self, embedding_model, word_embedding_model):
11 super().__init__()
12
13 self.embedding_model = select_backend(embedding_model)
14 self.word_embedding_model = select_backend(word_embedding_model)
15
16 def embed_words(self, words: List[str], verbose: bool = False) -> np.ndarray:
17 """Embed a list of n words into an n-dimensional

Callers

nothing calls this directly

Calls 1

select_backendFunction · 0.90

Tested by

no test coverage detected