Langsung ke konten
Skillpedia
Analisis & spreadsheet9.5k ยท #12270

xberg-extracting-keywords

Fungsinya

Skill ini menjelaskan cara mendapatkan kata kunci dari dokumen dengan metode YAKE atau RAKE, serta cara mendeteksi bahasa dokumen. Skill ini ditujukan untuk orang yang ingin label topik atau pemeriksaan bahasa dengan cepat.

Kapan dipakai

  • โœ“Saat Anda ingin topik atau kata kunci utama dari laporan atau makalah.
  • โœ“Saat Anda perlu tahu dokumen itu ditulis dalam bahasa apa.
  • โœ“Saat Anda sedang membangun pencarian dan membutuhkan embedding vektor dari dokumen.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-keywords/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œAmbil kata kunci utama dari makalah penelitian ini dan beri tahu saya bahasanya apa.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengaktifkan pengaturan kata kunci dalam opsi ekstraksi dan memilih YAKE atau RAKE. Kata kunci kemudian muncul di hasil. Embedding dibuat dengan perintah embed terpisah.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Apa perbedaan YAKE dan RAKE?

YAKE adalah metode statistik yang bekerja baik sebagai pilihan umum, sedangkan RAKE lebih menyukai frasa kunci dengan beberapa kata.

Mengapa kata kunci saya tidak muncul?

Fitur kata kunci harus sudah tersedia di dalam alat. Jika belum, pengaturannya diabaikan dan daftarnya kosong tanpa pesan error.

Di mana embedding dibuat?

Perintah embed khusus membuatnya, terpisah dari ekstraksi biasa.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
9.5k
Peringkat
#12270
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa