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.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/keybert-keyword-extraction/check). Click a policy:
Consume KeyBERT — BERT-Powered Keyword Extraction programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/keybert-keyword-extraction
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/keybert-keyword-extraction/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add keybert-keyword-extraction
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/keybert-keyword-extraction/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "keybert-keyword-extraction" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.