keybert
KeyBERT performs keyword extraction with state-of-the-art transformer models.
Decision gist · record as of 2026-08-14
Yes. KeyBERT is worth installing for semantic keyword extraction tasks. It has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and a straightforward API. The main consideration is that sentence-transformers downloads a transformer model on first use; verify that the model can be pre-cached and that extraction latency meets your needs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- sentence-transformers downloads a transformer model on first use; requires internet access or pre-cached model.
- Low install friction: pure Python wheel with four runtime dependencies (numpy, scikit-learn, sentence-transformers, rich).
- Actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — MIT License permits commercial and private use, modification, and redistribution with minimal restrictions—suitable for most projects.
last release 2025-02-07 (553 days) · last repo commit 2026-05-13 · 4,215 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 720,941 downloads/mo, #5,232 on PyPI
Alternatives
Verify before relying
pip install keybert
from keybert import KeyBERT
kw_model = KeyBERT()
keywords = kw_model.extract_keywords(doc)- Whether the package works offline after initial model download, or requires network access per extraction call.
- Memory footprint and latency characteristics for large documents or batch processing.
- Whether optional extras (flair, gensim, spacy, use) are required for production use or only for advanced embedding backends.
- Performance characteristics and typical extraction latency on standard document sizes.
What it is and what it does
KeyBERT is a lightweight keyword extraction library that uses pre-trained BERT embeddings to identify the words and phrases in a document that best represent its semantic content. It works by computing a document-level embedding, then embedding candidate n-grams, and ranking them by cosine similarity to the document. The library requires four runtime dependencies: numpy and scikit-learn for numerical operations, sentence-transformers to load and run embedding models, and rich for output formatting.
The package is designed for minimal setup. It supports multiple extraction strategies, configurable n-gram ranges, and pluggable embedding backends. It is actively maintained, supports Python 3.8, 3.9, 3.10, 3.11, and 3.12, and has no known security vulnerabilities.
Use it for
- Extract single-word keywords from research papers or articles to build document summaries or search indices.
- Generate multi-word keyphrases from product descriptions or customer feedback to identify key topics.
- Diversify keyword results using maximal marginal relevance to avoid redundant or near-duplicate extractions.
- Build a document tagger by extracting keywords and using them to label or categorize incoming text.
- Integrate semantic keyword extraction into a content recommendation system to match documents by extracted terms.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
KeyBERT is worth installing for semantic keyword extraction tasks. It has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and a straightforward API. The main consideration is that sentence-transformers downloads a transformer model on first use; verify that the model can be pre-cached and that extraction latency meets your needs.
Install
keybert on PyPI
Before you install
Low install friction: pure Python wheel with four runtime dependencies (numpy, scikit-learn, sentence-transformers, rich). Actively maintained with recent commits and no known vulnerabilities.
sentence-transformers downloads a transformer model on first use; requires internet access or pre-cached model.
License in practice
MIT License permits commercial and private use, modification, and redistribution with minimal restrictions—suitable for most projects.
Quickstart
pip install keybert
from keybert import KeyBERT
kw_model = KeyBERT()
keywords = kw_model.extract_keywords(doc)
Verify before relying
- Whether the package works offline after initial model download, or requires network access per extraction call.
- Memory footprint and latency characteristics for large documents or batch processing.
- Whether optional extras (flair, gensim, spacy, use) are required for production use or only for advanced embedding backends.
- Performance characteristics and typical extraction latency on standard document sizes.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesnumpyrichscikit-learnsentence-transformers |
| Maintenance | Actively maintained 553 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 720,941 / month, #5,232 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: keybert-0.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “keyword extraction with BERT”
- keybertKeyBERT extracts keywords and keyphrases from documents by computing…
- yakeYAKE extracts keywords from text documents using unsupervised…
- bertopicBERTopic performs topic modeling on text documents using transformer…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also bertopic · keyphrase-vectorizers · rake-nltk · yake · sentence-transformers · flashtext · stop-words · bert-score · flair · floret