MaartenGr / MaartenGr/BERTopic
`seed_topic_list` throwing error related to inhomogeneous shape after 1 dimensions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
I am using the following code to use `seed_topic_list`
```{python}
embedding_model = 'all-mpnet-base-v2'
word_list = ["Bullion",'market','price','commodity',"precious", "metal",'gilt','carat','aurum','world', 'gold', 'council','mine','mining','bitcoin','forecast','bank','liquidity','ingot','stocks','delivery','settlement','ETF']
word_lists = [[word.lower()] for word in word_list]
model = BERTopic(
verbose=True,
min_topic_size=5,
language="english",
seed_topic_list = word_list,
embedding_model = SentenceTransformer(embedding_model)
)
topics, probs = model.fit_transform(df['news_article'])
```
I am getting the following error!

Can somebody tell me, what is the correct way to use `seed_topic_list`?
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 at the BERTopic constructor's seed_topic_list argument and the subsequent fit_transform call, comparing the supplied word_list with the expected input shape. Use the traceback shown in the issue to identify the failing operation, then verify that the corrected input allows fit_transform to complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100