MaartenGr / MaartenGr/BERTopic
Custom labels for get_topic_tree
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
### Discussed in https://github.com/MaartenGr/BERTopic/discussions/2122
Originally posted by **clfkenny** August 17, 2024
Hi there, I noticed the `visualize_hierarchy` method has a `custom_labels` parameter. Is there anything similar to this for the `get_topic_tree` method? I use the LLM generated labels as the custom labels so the hierarchy tree is much easier to interpret. Thanks!
This seems like a good first issue for someone wanting to contribute to this repository. It has a very similar structure to the `visualize_hierarchy` functionality, so I believe it should be straightforward to implement. Unfortunately, I have a large backlog and cannot prioritize this, so if anyone wants to help out then that would be great!
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 comparing the get_topic_tree method with visualize_hierarchy, especially how visualize_hierarchy handles its custom_labels parameter. Trace how labels are produced for the hierarchy tree, then add equivalent custom-label support to get_topic_tree. Done means callers can provide custom labels and receive a more interpretable hierarchy tree.
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