Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 76
  • 5.2k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-guide

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install nlp-toolkit-guide in Claude Code

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

A

No 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 →

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.

nlp-toolkit-guide Install

Add to stack

Loading.