MaartenGr / MaartenGr/BERTopic

Best way to find all documents related to keyword

Open
#1,633 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
920
Avg merge
22h 24m
Merged PRs (30d)
5

Description

Say I have a topic model on a large collection of documents. What's the best way to find all topics and documents matching a certain keyword, eg the keyword "Sport" in the example topic model. I know I can search for similar topics, eg:

similar_topics, similarity = topic_model.find_topics("sport", top_n=20)

But I'm wondering if this is the best/only way? The semantic relationships in the 2D representation of topics isn't always that clear (as is often the case going from many-D to 2D), so I can't really just pick nearby topic clusters. What would you recommend as best practice here?

Many thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown topic_model.find_topics("sport", top_n=20) call and review how the 2D topic representation is used. Determine whether the existing topic model API can identify both matching topics and documents, and clarify the expected best-practice workflow before defining what completion means.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.