MaartenGr / MaartenGr/BERTopic
How to get more than 3 representative docs per topic via get_topic_info()?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
Hey, thank you so much for making this library! Super awesome.
I've seen a bunch of issues here requesting this but haven't found a straightforward easy way to specify it via get_topic_info() as it contains a lot of the information I need. I wish there was a parameter in there like get_topic_info(number_of_representative_documents=3) that I could modify.
I'm not sure that `_extract_representative_docs` will work in my context as I'm using umap, hdbscan, and gpt for topic labels, no tfidf or anything, which seems to be a required parameter
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing get_topic_info() and _extract_representative_docs(), focusing on how the current limit of three representative documents is selected. Check whether that path depends on TF-IDF and how the requested count could remain usable with UMAP, HDBSCAN, and GPT-based topic labels; done means get_topic_info() can return the requested number in that context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100