技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
nltk【数据与研究】Use NLTK for classical natural-language processing in Python: install the package and data, tokenize and tag text, stem or lemmatize, build grammars and parse trees, train classical models, score metrics, and work with translation alignments.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task names NLTK or asks for classical Python NLP workflows involving tokenization, corpora, POS tagging, stemming, parsing, grammar, text classification, sentiment, language models, translation metrics, or NLTK data packages.
NLTK 3.10.x is a broad toolkit rather than one end-to-end model. Start from the user's artifact and task: raw text, tokens, tagged sentences, a corpus/resource, a grammar, features, an aligned parallel corpus, or an evaluation score.
NLTK supports Python 3.10 through 3.14. The base install provides defusedxml, click, joblib, regex, and tqdm.
python -m pip install nltk
python - <<'PY'
import nltk
print(nltk.__version__)
PY
Optional extras are deliberately separate: machine_learning (numpy, python-crfsuite, scikit-learn, scipy), plot (matplotlib), tgrep (pyparsing), twitter (twython), and corenlp (requests). Install only the extra or external tool the task requires.
NLTK code and NLTK data are separate. Do not treat import nltk as proof that punkt_tab, tagger models, corpora, WordNet, or VADER data are installed.
sub-skills/data-and-downloader/SKILL.md. It covers NLTK_DATA, nltk.data.path, nltk.data.find/load, targeted downloader commands, corpus readers, and safe recovery.sub-skills/tokenize-tag-stem/SKILL.md. It covers word_tokenize, sent_tokenize, the nltk tokenize CLI, pos_tag, tagger backoff, stemmers, WordNet lemmatization, and VADER.sub-skills/grammar-parse-semantics/SKILL.md.sub-skills/ml-metrics-and-translation/SKILL.md.For a pipeline that spans routes, use them in order: data/resource checks → tokenization/tagging → grammar or feature construction → model/metric evaluation. Keep each stage's input shape explicit.
LookupError names an attempted resource, use that exact path to choose the smallest package; do not default to all or popular.nltk.data path-security checks.references/troubleshooting.md for cross-cutting installation, data, optional-dependency, API-shape, CLI, and security failures.references/native-verification.md when selecting a safe smoke or native test; it records what was verified and what remains data- or tool-dependent.scripts/nltk_doctor.py with --help first, then --json for a read-only import/CLI/resource diagnostic. It never downloads data unless --download is explicitly supplied.references/repo-provenance.md before deciding whether this skill matches a changed NLTK checkout or should be refreshed.This is a runtime package skill, not a release or contributor manual. It does not bundle NLTK corpora, Java tools, Stanford/CoreNLP/Senna/Malt/MEGAM/TADM binaries, GUI assets, credentials, or the original repository's tests/docs. Those artifacts informed the routes and verification plan; runtime helpers and distilled references live inside this skill tree.