技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-and-downloader【数据与研究】Configure NLTK data search paths, download only needed NLTK data packages, locate/load resources with nltk.data, use corpus readers, and recover safely from missing, corrupt, stale, or unsafe data archives.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about NLTK data packages rather than NLP algorithm usage: selecting targeted data downloads, setting NLTK_DATA/nltk.data.path, checking nltk.data.find() and nltk.data.load(), using nltk.corpus readers, diagnosing missing or corrupt resources, or recovering from downloader/path security failures.
Route away from this sub-skill when the task is mainly about:
../tokenize-tag-stem/SKILL.md.../grammar-parse-semantics/SKILL.md.../ml-metrics-and-translation/SKILL.md.all unless the user explicitly wants the full collection. Common targeted packages: punkt_tab, averaged_perceptron_tagger_eng, averaged_perceptron_tagger_rus, wordnet, omw-2.0, vader_lexicon, universal_tagset, brown, treebank, reuters, and comtrans.python -m nltk.downloader -d /path/to/nltk_data PKG... or import nltk; nltk.download("PKG", download_dir="/path/to/nltk_data") for explicit downloads. Use -q/--quiet, -f/--force, -e/--exit-on-error, and -u/--url only when the task calls for them.NLTK_DATA=/path/to/nltk_data before Python starts, or prepend the directory at runtime with import nltk.data; nltk.data.path.insert(0, "/path/to/nltk_data").nltk.data.find("tokenizers/punkt_tab/english/"), nltk.data.find("taggers/averaged_perceptron_tagger_eng/"), nltk.data.find("corpora/wordnet/"), or nltk.data.find("sentiment/vader_lexicon.zip/vader_lexicon/vader_lexicon.txt").from nltk.corpus import brown, wordnet, reuters; start with fileids(), words(), sents(), tagged_words(), raw(), readme(), and categories() where the reader supports them.LookupError messages as package hints, but distinguish “package missing” from “package present but entry missing/corrupt”; stale/corrupt packages should be force-redownloaded into a controlled directory.nltk_data, and rely on the downloader’s validated extraction path instead of custom unsafe extraction.NLTK_DATA setup, downloader commands, corpus reader recipes, and safe recovery patterns: references/data-workflows.md.nltk.download, Downloader, nltk.data.find/load, CLI flags, and common corpus reader methods: references/api-reference.md.references/troubleshooting.md.scripts/check_nltk_data.py.nltk.__version__, Python version, NLTK_DATA, and the effective nltk.data.path before changing the environment.nltk.data.find() or the bundled no-download script; avoid importing a corpus reader as proof unless you also call a method such as fileids() or words()[:5].download_dir; re-run a no-download check afterward.brown.fileids(), brown.words(fileids="ca01"), brown.tagged_words(tagset="universal"), wordnet.synsets("dog"), reuters.categories(), or comtrans.aligned_sents()[:1] when the package is installed.ValueError/LookupError) and archive extraction errors leave no partially trusted content to load.Run the bundled checker from any current working directory after installing NLTK:
python /path/to/skills/disco/nltk/sub-skills/data-and-downloader/scripts/check_nltk_data.py --help
python /path/to/skills/disco/nltk/sub-skills/data-and-downloader/scripts/check_nltk_data.py --inspect