KeyBERT
KeyBERT copied to clipboard
v0.7
- 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
.