Repository navigation
Ability to change # of documents pulled per topic by .get_representative_docs()? #847
MogwaiMomo
started this conversation in
Ideas
Replies: 1 comment
|
Thank you for your kind words! Unfortunately, that is currently not possible. I have been quite hesitant adding parameters to BERTopic in order to keep the package relatively straightforward to use. Just out of curiosity, would something like the following suffice for you: # When you used `.fit_transform`:
df = pd.DataFrame({"Document": docs, "Topic": topic})
# When you used `.fit`:
df = pd.DataFrame({"Document": docs, "Topic": topic_model.topics_})That way, you have all documents mapped to a topic and you can go through a sample of those yourself. Or would you want the top n most representative documents extracted instead? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello!
Is there currently any way to adjust the number of documents pulled up by .get_representative_docs method? As far as I can tell the default is to return 3 documents per topic. For me it would be incredibly valuable to be able to increase customize this number, so that you could pull up 5 or 10 representative documents per topic.
Thank you in advance and just a note that I cannot believe BERTopic exists as it is SO awesome and so thoughtfully designed :)
All reactions