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

Function merged_topic_model

tests/conftest.py:122–132  ·  view source on GitHub ↗
(custom_topic_model, documents)

Source from the content-addressed store, hash-verified

120
121@pytest.fixture(scope="session")
122def merged_topic_model(custom_topic_model, documents):
123 model = copy.deepcopy(custom_topic_model)
124
125 # Merge once
126 topics_to_merge = [[1, 2], [3, 4]]
127 model.merge_topics(documents, topics_to_merge)
128
129 # Merge second time
130 topics_to_merge = [[5, 6, 7]]
131 model.merge_topics(documents, topics_to_merge)
132 return model
133
134
135@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 1

merge_topicsMethod · 0.80

Tested by

no test coverage detected