【发布时间】:2021-12-12 21:04:14
【问题描述】:
我有一个数据集并尝试使用 berTopic 建模将其转换为主题,但问题是,我无法获取主题的所有文档。 berTopic 每个主题仅返回 3 个文档。
topic_model = BERTopic(verbose=True, embedding_model=embedding_model,
nr_topics = 'auto',
n_gram_range = (3,3),
top_n_words = 10,
calculate_probabilities=True,
seed_topic_list = topic_list,
)
topics, probs = topic_model.fit_transform(docs_test)
representative_doc = topic_model.get_representative_docs(topic#1)
representative_doc
【问题讨论】:
标签: nlp text-classification bert-language-model topic-modeling