Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Keybert for a list of docs to extract arabic keywords #205

Open
Manel-Hik opened this issue Feb 6, 2024 · 1 comment
Open

Running Keybert for a list of docs to extract arabic keywords #205

Manel-Hik opened this issue Feb 6, 2024 · 1 comment

Comments

@Manel-Hik
Copy link

Manel-Hik commented Feb 6, 2024

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

@MaartenGr
Copy link
Owner

Could you share your full code and error messages? That makes it a bit easier to understand what is happening here. Also, which version of KeyBERT are you using? Make sure to format everything with code blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants