본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트9.5k · #12270

xberg-extracting-keywords

하는 일

이 스킬은 YAKE나 RAKE 방법으로 문서에서 키워드를 얻고, 문서의 언어를 감지하는 방법을 설명합니다. 빠른 주제 태그나 언어 확인이 필요한 사람을 위한 것입니다.

사용하는 경우

  • ✓보고서나 논문의 핵심 주제와 키워드를 알고 싶을 때.
  • ✓문서가 어떤 언어로 작성되었는지 알아야 할 때.
  • ✓문서에서 만든 벡터 임베딩이 필요한 검색 기능을 만들고 있을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-keywords/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 연구 논문에서 핵심 키워드를 뽑아 주고, 어떤 언어로 쓰였는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 추출 옵션에서 키워드 설정을 켜고 YAKE나 RAKE 중 하나를 고릅니다. 키워드는 결과에 나타납니다. 임베딩은 별도의 embed 명령으로 만듭니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

자주 묻는 질문

YAKE와 RAKE의 차이는 무엇인가요?

YAKE는 일반적인 기본값으로 잘 맞는 통계 방법이고, RAKE는 여러 단어로 된 핵심 구문을 선호합니다.

키워드가 왜 보이지 않나요?

키워드 기능이 도구에 포함되어 있어야 합니다. 포함되어 있지 않으면 설정은 무시되고, 오류 없이 목록이 비어 있게 됩니다.

임베딩은 어디서 만드나요?

일반 추출과는 별도로, 전용 embed 명령이 임베딩을 만듭니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
9.5k
순위
#12270
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬