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

v0.7 #135

Merged
merged 6 commits into from
Nov 3, 2022
Merged

v0.7 #135

merged 6 commits into from
Nov 3, 2022

Conversation

MaartenGr
Copy link
Owner

@MaartenGr MaartenGr commented Oct 11, 2022

  • Fixed Gensim backend not working after v4 migration #71
  • Cleaned up documentation and added several visual representations of the algorithm (excluding MMR / MaxSum)
  • Added function to extract and pass word- and document embeddings which should make fine-tuning much faster
from keybert import KeyBERT

kw_model = KeyBERT()

# Prepare embeddings
doc_embeddings, word_embeddings = kw_model.extract_embeddings(docs)

# Extract keywords without needing to re-calculate embeddings
keywords = kw_model.extract_keywords(docs, doc_embeddings=doc_embeddings, word_embeddings=word_embeddings)

Do note that the parameters passed to .extract_embeddings for creating the vectorizer should be exactly the same as those in .extract_keywords.

@MaartenGr MaartenGr merged commit 7b763ae into master Nov 3, 2022
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

Successfully merging this pull request may close these issues.

1 participant