KeyBERT Minimal Keyword Extraction with BERT Embeddings

KeyBERT is a minimal and easy-to-use Python library that leverages BERT embeddings and cosine similarity to extract keywords and keyphrases from documents. It supports multiple embedding backends including sentence-transformers, Flair, and spaCy, with built-in diversity algorithms like Max Sum Similarity and Maximal Marginal Relevance.

agentskillexchange Updated 28 repo stars

File contents

KeyBERT Minimal Keyword Extraction with BERT Embeddings

KeyBERT is a minimal and easy-to-use Python library that leverages BERT embeddings and cosine similarity to extract keywords and keyphrases from documents. It supports multiple embedding backends including sentence-transformers, Flair, and spaCy, with built-in diversity algorithms like Max Sum Similarity and Maximal Marginal Relevance.

Installation

Use the upstream install or setup path that matches your environment:

  • pip install keybert
  • pip install keybert[flair]
  • pip install keybert[gensim]
  • pip install keybert[spacy]

Requirements and caveats from upstream:

  • python

Basic usage or getting-started notes:

Source

agentskillexchange/skills/tree/main/skills/keybert-keyword-extraction-bert commit 1768f88e72

Frequently asked questions

npx skillmds@latest add agentskillexchange/keybert-minimal-keyword-extraction-with-bert-embeddings