MaartenGr / MaartenGr/KeyBERT

Running Keybert for a list of docs to extract arabic keywords

Open
#205 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.2k
Forks
385
PR merge metrics
No merged PRs in 30d

Description

Hi I have a list of arabic text and I want to extract keywords of each list element, for this I'm following the documentation ,
So I started by initiating the keybert model with this model
`from keybert import KeyBERT
kw_model = KeyBERT(model="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2") `
then to extract doc and word embedding I did this
`doc_embeddings, word_embeddings = kw_model.extract_embeddings(doc, min_df=1, stop_words= stp.stopwords_list())
` with stp.stopwords_list() is my custom stop words for arabic
But this last line throws an error:
`ValueError: not enough values to unpack (expected 2, got 0)`
edit: doc is a list of text , len of doc is 108789, each text is an article
I didn't understand why this error and how to figure it out.
Thank you

Contributor guide

No contributing guide indexed for this repository

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 documented KeyBERT usage and the kw_model.extract_embeddings call shown in the issue, reproducing it with the Arabic stop-word list and a small sample before considering the full 108,789-item list. Trace where extract_embeddings produces no values and compare the call with the model's documented input expectations. Done means the cause of the unpacking error is established and the issue includes a verified correction or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.