Skills

Xberg Extracting Keywords

Use when extracting keywords (YAKE/RAKE) from documents, and, secondarily, when...

Install

npx skills add xberg-io/xberg --skill xberg-extracting-keywords -g -a claude-code -y
Repository
xberg-io/xberg9.5k
Category
AI and agents
Updated
3d ago
License
MIT
Context cost
Mediumabout 1,599 tokens
Runs scripts
No, instructions only

What it does

Use when extracting keywords (YAKE/RAKE) from documents, and, secondarily, when detecting document language or generating embeddings for RAG and search. Covers the keyword config (and its feature gating), `--detect-language`, and the standalone `embed` command with real flags.

<!-- AI-RULEZ :: GENERATED FILE, DO NOT EDIT Content-Hash: blake3:491d3cbcd4f6128d43e32b39c13d03a023b397f97c71da48ed5a02d6be00ae28 Source-Hash: blake3:4a90223a333b0f963ae8cdec4f38db88b769132c5dd1b7f39a7fe8e84f57f83e Schema-Version: v1 -->

Extracting keywords, language, and embeddings

Use this for the enrichment surface around extraction: statistical keyword extraction, language detection, and vector embeddings. Keywords and language detection ride along with extraction and land on the result; embeddings are produced by a dedicated embed command.

Keywords (YAKE / RAKE)

Keyword extraction is configured via the [keywords] config block (or inline JSON), there is no single --keywords CLI flag. When enabled, extracted keywords appear on result.extracted_keywords (extractedKeywords in Node.js; the CLI JSON field is extracted_keywords). Two algorithms are available:

  • YAKE ("yake"), statistical, unsupervised single-document extraction. Good general default.
  • RAKE ("rake"), co-occurrence / phrase-based. Favors multi-word key phrases.

Feature-gated: keyword extraction requires the CLI to be built with the keywords-yake and/or keywords-rake Cargo features (both are in the default/full build). If the CLI was built without them, the [keywords] config block is silently ignored, result.extracted_keywords simply stays empty rather than erroring. The "yake" algorithm needs keywords-yake; "rake" needs keywords-rake.

Enable via inline JSON on the CLI:

xberg extract paper.pdf --format json \
  --config-json '{"keywords":{"algorithm":"yake","max_keywords":15,"language":"en"}}' \
  | jq '.result.extracted_keywords'

Or in a config file:

Read the whole SKILL.md on GitHub

More in AI and agents