qmetrics.net

KeyBERT

Minimal BERT embedding keyword and keyphrase extraction

KeyBERT screenshot

KeyBERT extracts keywords and keyphrases by comparing BERT document and n-gram embeddings with cosine similarity. Install via pip with a few lines of Python.

Overview

KeyBERT is a small Python library for keyword and keyphrase extraction built on BERT embeddings. It embeds the full document, embeds candidate words or phrases from an n-gram range, and ranks them by cosine similarity to the document vector.

The default workflow needs only a short Python snippet after installation. You can control phrase length with keyphrase_ngram_range, extract multi-word keyphrases, and optionally highlight keywords in the source text. It is intended as a quick, installable alternative to methods that require training custom models from scratch.

For more diverse results, KeyBERT supports Max Sum Distance and Maximal Marginal Relevance selection strategies. It can plug in multiple embedding backends, including Sentence-Transformers, Flair, spaCy, Gensim, and USE models.

KeyLLM extends the project with keyword extraction through large language models, including direct ChatGPT queries and similarity-based batching to avoid redundant extractions across similar documents.

Key features

  • BERT cosine similarity ranking
  • Configurable n-gram keyphrases
  • Maximal Marginal Relevance option
  • Max Sum Distance diversification
  • Multiple embedding model backends
  • Keyword highlighting support
  • Batch document processing
  • KeyLLM large language model mode

Use cases

  • Document keyword tagging
  • Keyphrase summarization
  • Research paper term extraction
  • Multi-document theme discovery
  • Prototype NLP pipelines

Tags

Similar software

TensorFlow

End-to-end machine learning platform and tooling ecosystem

TensorFlow is a machine learning platform with Python and C++ APIs, optional GPU packages, and companion libraries for data, training, deployment, and visualization.

★ 201.8k⟳ todayApache-2.0

Transformers

Shared model definitions for multimodal ML workloads

Transformers is a Python library that defines pretrained text, vision, audio, and multimodal models once in PyTorch for shared inference and training across the ecosystem.

★ 169.4k⟳ todayApache-2.0

RAGFlow

Open-source RAG engine and agent context platform

RAGFlow ingests heterogeneous documents, builds retrievable knowledge, and supports agent workflows with citations. It can run on your own hardware with Docker or a from-source server stack.

★ 94.8k⟳ todayApache-2.0

Headroom

Local LLM context compression library and proxy

Headroom shrinks tool outputs, logs, JSON, and chat history before LLM calls to cut input tokens while preserving retrievable originals. It offers a Python library, proxy, MCP tools, and agent wrappers.

★ 81k⟳ yesterdayApache-2.0

Unsloth

Local desktop workspace to run and fine-tune AI models

Unsloth is a desktop application to chat with, fine-tune, and serve LLMs, diffusion, audio, and embedding models on your own hardware with optional agent integrations.

★ 80.4k⟳ todayApache-2.0

Models

TensorFlow reference models and modeling utilities collection

The TensorFlow Model Garden hosts implementations of models and modeling solutions for TensorFlow, installable via pip as tf-models-official.

★ 77.6k⟳ 11 days agoApache-2.0