Skip to main content

Keyword extraction for grekt artifacts using KeyBERT

Project description

grekt-keywords

Keyword extraction for grekt artifacts using KeyBERT.

Installation

# Recommended: CPU-only (~300MB)
pip install grekt-keywords --index-url https://download.pytorch.org/whl/cpu

# With GPU support (~4GB)
pip install grekt-keywords

Usage

CLI

# From argument
grekt-keywords "An agent that helps with Kubernetes deployments and Helm charts"

# From stdin
echo "An agent that helps with Kubernetes deployments" | grekt-keywords

# JSON output (for programmatic use)
grekt-keywords --json "Your artifact description here"

Python API

from grekt_keywords import extract_keywords

keywords = extract_keywords("An agent that helps with Kubernetes deployments")
# ['kubernetes', 'deployments', 'agent', 'helps']

Options

Option Default Description
--min 3 Minimum number of keywords
--max 5 Maximum number of keywords
--json false Output as JSON array

Why?

grekt artifacts require keywords for discoverability in the lazy-loading index. This tool extracts meaningful keywords from your artifact description using KeyBERT + MiniLM.

Model

Uses all-MiniLM-L6-v2 (~80MB) for keyword extraction.

First run: Downloads the model from Hugging Face Hub and caches it in ~/.cache/huggingface/.

Subsequent runs: Uses the cached model (works offline).

For CI/CD environments, the model will be downloaded on first execution. You can pre-cache it by running grekt-keywords "test" once.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grekt_keywords-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grekt_keywords-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file grekt_keywords-0.1.0.tar.gz.

File metadata

  • Download URL: grekt_keywords-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for grekt_keywords-0.1.0.tar.gz
Algorithm Hash digest
SHA256 768a5e0f9865e0310209f38852d9bfe81e9b3e2a46c87771ca8d14c3cb8629c6
MD5 1c81da98f51677a3a7d42e2f319f4dcb
BLAKE2b-256 e006d5f2663fb46c122f7a81b36890d6df853949ddae4be63e604ddbe10ac2ec

See more details on using hashes here.

File details

Details for the file grekt_keywords-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: grekt_keywords-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for grekt_keywords-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33055c4032859cad484601e126b0a057a49d37973d9142925db7627aaaf3b5a3
MD5 206ce3cd679af52d28e1caa4799bc647
BLAKE2b-256 f95194839ba21337741372149bc886f65d12a165e9aaaa76c1cb315ab74607a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page