nlp-toolkit-guide
Skill by brycewang-stanford
Provides Python code for NLP metrics including perplexity, burstiness, and entropy. Aimed at NLP researchers working on AI text detection, text quality, and corpus analysis.
Install nlp-toolkit-guide
Built from the published package, never by AI.
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills /tmp/Auto-Empirical-Research-Skills && mkdir -p ~/.claude/skills && cp -r /tmp/Auto-Empirical-Research-Skills/skills/43-wentorai-research-plugins/skills/domains/ai-ml/nlp-toolkit-guide ~/.claude/skills/nlp-toolkit-guideRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills /tmp/Auto-Empirical-Research-Skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Auto-Empirical-Research-Skills/skills/43-wentorai-research-plugins/skills/domains/ai-ml/nlp-toolkit-guide ~/.gemini/antigravity-cli/skills/nlp-toolkit-guideAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
NLP Toolkit Guide is a SKILL.md document with Python code for common NLP metrics. It covers perplexity scoring with a causal language model from Hugging Face Transformers, burstiness of repeated words based on their positions in a text, and Shannon entropy at word or character level. It also includes conditional entropy for n-grams, a tokenizer comparison function, and a combined AI text detection function.
The perplexity code uses GPT-2 by default and returns text-level and token-level values. The guide describes low perplexity and low burstiness as signals associated with AI-generated text. It recommends combining several signals rather than relying on one metric, and warns that perplexity thresholds may not transfer across domains. It is aimed at researchers in AI text detection, text quality assessment, and corpus analysis.
Written from the project's SKILL.md and checked against it.
What it can do
- compute_perplexityComputes text-level and token-level perplexity using a causal language model, GPT-2 by default.
- compute_burstinessComputes burstiness scores for words based on the spacing between their occurrences.
- compute_entropyComputes Shannon entropy at word or character level, with normalized entropy and type-token ratio.
- compute_conditional_entropyComputes conditional entropy H(X_n | X_{n-1}) for n-gram analysis.
- analyze_text_authenticityCombines perplexity, burstiness, and entropy into a multi-signal AI versus human text check.
- compare_tokenizersCompares tokenization across several models, including token counts and compression ratio.
What you need
- Python
- Hugging Face Transformers
- PyTorch
- NumPy
Try asking
- Compute the perplexity and token-level perplexity of this paragraph using GPT-2.
- Run the burstiness analysis on my essay and show the top words by score.
- Compare how gpt2 and bert-base-uncased tokenize this sentence.
Good to know
- Perplexity is relative to the chosen model, so results depend on the model used.
- Heuristic thresholds may not transfer across domains, such as news text and scientific papers.
- No single metric is reliable alone, according to the guide.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/43-wentorai-research-plugins/skills/domains/ai-ml/nlp-toolkit-guide/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to nlp-toolkit-guide
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
nlp-toolkit-guide: common questions
What metrics does the NLP Toolkit Guide cover?
It covers perplexity, burstiness, Shannon entropy, conditional entropy for n-grams, and tokenization comparison. It also includes a combined AI text detection function.
Can this detect AI-generated text?
The guide describes a multi-signal pipeline that uses perplexity, burstiness, and entropy as features for AI versus human text classification. It notes that no single metric is reliable on its own.
Which models does it use?
Perplexity uses GPT-2 by default, and the tokenizer comparison uses gpt2, bert-base-uncased, and facebook/opt-1.3b by default. The source says perplexity must always be computed with a specified model.
How do I install nlp-toolkit-guide?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is nlp-toolkit-guide free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is nlp-toolkit-guide safe to use?
It scores 76 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to nlp-toolkit-guide?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
