◆SkillMarketingFree
KeyBERT — BERT-Powered Keyword Extraction
Minimal keyword and keyphrase extraction using BERT embeddings — finds the most representative terms in any content for SEO and content strategy.
KeyBERT — BERT-Powered Keyword Extraction
KeyBERT is a minimal, easy-to-use keyword extraction library that leverages BERT embeddings to find the keywords and keyphrases most similar to the overall document embedding. It is ideal for SEO keyword discovery, content gap analysis, tag generation, and topic modeling from marketing copy, blog posts, and product descriptions.
Key Features
- Single-function API:
model.extract_keywords(doc) - MMR (Maximal Marginal Relevance) for diverse, non-redundant keyword sets
- Max Sum Distance for global keyword diversity
- Candidate keyphrases via KeyphraseVectorizers or CountVectorizer
- Multilingual support via sentence-transformers multilingual models
- Compatible with any HuggingFace sentence-transformer checkpoint
Quick Start
pip install keybert
from keybert import KeyBERT
doc = """Supervised machine learning is used to classify marketing emails
by topic, improving open rates and conversion funnels."""
kw_model = KeyBERT()
keywords = kw_model.extract_keywords(doc, keyphrase_ngram_range=(1, 2),
stop_words='english', top_n=5)
print(keywords)
# [('machine learning', 0.68), ('marketing emails', 0.61), ...]
npx ai-supply add keybert-keyword-extraction
Curated mirror of the open-source KeyBERT (MIT). Get it from the source.