Document classifier
Logic for categorizing documents into subjects based on keyword matching.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill document-classifierAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.5 KB, 336 tokens by cl100k_base, as published. Nobody here has run it
Document Classifier Skill
This skill outlines a strategy for classifying documents into predefined categories using keyword frequency and priority.
Subjects and Keywords
- LLM (Large Language Models)
- Keywords: LLM, transformer, GPT, pre-training, inference, attention mechanism, BERT, language model.
- Trapped Ion and Quantum Computing
- Keywords: trapped ion, quantum computer, qubit, entanglement, Paul trap, laser cooling, gate fidelity, Rydberg.
- Black Hole
- Keywords: black hole, event horizon, Schwarzschild, Hawking radiation, gravitational waves, accretion disk, singularity.
- DNA
- Keywords: DNA, genome, sequencing, nucleotide, CRISPR, polymerase, genetic, chromosome, protein synthesis.
- Music History
- Keywords: music, composer, symphony, baroque, classical era, opera, jazz, rhythmic, harmony, melody.
Classification Logic
- Extraction: Extract the first 1000-2000 characters of the document.
- Scoring: Count occurrences of keywords for each category.
- Tie-breaking: If no keywords match or there is a tie, use the "last folder" rule as per user instruction (in this case, Music History if others fail, or simply the most likely fit).
- Verification: Check the title or abstract specifically if the score is low.
Implementation Tip
Use a script or a loop to process files in batches to save time.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.