Saltar al contenido
Skillpedia
Análisis y hojas de cálculo9,5 mil · #12270

xberg-extracting-keywords

Qué hace

Esta habilidad explica cómo obtener palabras clave de documentos con los métodos YAKE o RAKE, y cómo detectar el idioma de un documento. Está pensada para personas que quieren etiquetas de tema rápidas o comprobaciones de idioma.

Cuándo usarla

  • ✓Cuando quieres los temas o palabras clave principales de un informe o un artículo.
  • ✓Cuando necesitas saber en qué idioma está escrito un documento.
  • ✓Cuando estás construyendo un buscador y necesitas embeddings vectoriales creados a partir de documentos.

Link de la skill

https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-keywords/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-keywords/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Extrae las palabras clave principales de este artículo de investigación y dime en qué idioma está.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente activa el ajuste de palabras clave en las opciones de extracción y elige YAKE o RAKE. Las palabras clave aparecen después en el resultado. Los embeddings se crean con un comando de incrustación independiente.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

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:

[keywords]
algorithm = "rake"       # "yake" or "rake"
max_keywords = 10        # default 10
min_score = 0.0          # filter below this score (normalized 0.0-1.0 for both algorithms)
ngram_range = [1, 3]     # unigrams..trigrams (default); config-file only
language = "en"          # stopword language; omit to skip stopword filtering
xberg extract report.pdf --config xberg.toml --format json | jq '.result.extracted_keywords'

Field notes:

  • max_keywords caps how many keywords are returned (default 10).
  • min_score filters low-scoring keywords. Both YAKE and RAKE normalize their scores to the 0.0-1.0 range with higher-is-better, so min_score retains keywords with score >= min_score identically for either algorithm.
  • ngram_range is [min, max]: [1,1] unigrams only, [1,2] adds bigrams, [1,3] (default) adds trigrams. Config-file only — it is not a field on the language bindings' KeywordConfig.
  • language enables stopword filtering for that language; omit it to disable stopword filtering entirely.

Language detection

Language detection is a real CLI flag: --detect-language. Detected languages appear on result.detected_languages:

xberg extract multilingual.pdf --detect-language true --format json \
  | jq '.result.detected_languages'

In a config file it lives under [language_detection]:

[language_detection]
enabled = true
min_confidence = 0.8
detect_multiple = false

The CLI flag enables detection with min_confidence = 0.8 and single-language mode; use the config block to detect multiple languages or tune confidence.

Embeddings (embed command)

The standalone embed command produces vector embeddings for text from --text (repeatable) or stdin. It does not run extraction — pipe extracted content in if you want document embeddings.

# Local ONNX preset model (default provider)
xberg embed --text "first passage" --text "second passage" --preset balanced

# Embed extracted document text
xberg extract report.pdf | xberg embed --preset quality

Presets for the local provider: fast, balanced (default), quality, multilingual. Output defaults to JSON (--format json).

--provider selects the embedding source:

Provider Flag Notes
local --preset <fast|balanced|quality|multilingual> Default. ONNX model, no API key.
llm --model <id> --api-key <key> liter-llm routing, e.g. openai/text-embedding-3-small.
plugin --plugin <name> A backend pre-registered in-process via the plugin API.
# Provider-hosted embeddings via an LLM
xberg embed --text "query text" \
  --provider llm --model openai/text-embedding-3-small --api-key "$OPENAI_API_KEY"

Local embedding presets must be down

Preguntas frecuentes

¿Cuál es la diferencia entre YAKE y RAKE?

YAKE es un método estadístico que funciona bien como opción general por defecto, mientras que RAKE favorece frases clave de varias palabras.

¿Por qué faltan mis palabras clave?

La función de palabras clave tiene que estar incluida en la herramienta. Si no lo está, el ajuste se ignora y la lista queda vacía sin mostrar ningún error.

¿Dónde se crean los embeddings?

Un comando específico los crea, separado de la extracción normal.

Detalles

Descripción original del autor

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.

repo: xberg-io/xberg

Popularidad

Estrellas en GitHub
9,5 mil
Posición en el ranking
#12270
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas