# Xberg Extracting Keywords

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

- Repository: https://github.com/xberg-io/xberg (9506 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add xberg-io/xberg --skill xberg-extracting-keywords -g -a claude-code -y`
Codex: `npx skills add xberg-io/xberg --skill xberg-extracting-keywords -g -a codex -y`
Cursor: `npx skills add xberg-io/xberg --skill xberg-extracting-keywords -g -a cursor -y`
Gemini CLI: `npx skills add xberg-io/xberg --skill xberg-extracting-keywords -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add xberg-io/xberg`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

<!--
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:

```bash
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:

The rest: https://github.com/xberg-io/xberg/blob/HEAD/plugin/.cursor-plugin/skills/xberg-extracting-keywords/SKILL.md
