KeyBERT icon indicating copy to clipboard operation
KeyBERT copied to clipboard

v0.7

Open MaartenGr opened this issue 1 year ago • 0 comments

  • Added function to extract and pass word/document embeddings which should make fine-tuning much faster
  • Fix #71
from keybert import KeyBERT

kw_model = KeyBERT()
doc_embeddings, word_embeddings = kw_model.extract_embeddings(docs)
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 avatar Oct 11 '22 09:10 MaartenGr