NLTK
The Natural Language Toolkit — Python's foundational NLP library for tokenization, POS tagging, parsing, and corpora.
NLTK — Natural Language Toolkit
NLTK is the de facto standard Python library for classical NLP. It provides easy-to-use interfaces to over 50 corpora and lexical resources (including WordNet), along with tokenizers, stemmers, taggers, parsers, semantic reasoners, and a suite of NLP utilities used in education and research worldwide.
Key Features
- Tokenization — word, sentence, and regexp tokenizers for 50+ languages
- POS tagging — perceptron and Brill taggers; trained on Penn Treebank
- Parsing — CFG, PCFG, dependency, and chart parsers with tree visualization
- Stemming & lemmatization — Porter, Snowball, Lancaster stemmers; WordNet lemmatizer
- Corpora — bundled access to Reuters, Brown, CoNLL, WordNet, and 50+ more via
nltk.download() - Semantic reasoning — first-order logic, lambda calculus, and discourse representation structures
- Classification — Naive Bayes, MaxEnt, Decision Tree classifiers for text
Quick Start
pip install nltk
import nltk
nltk.download('punkt_tab')
nltk.download('averaged_perceptron_tagger_eng')
from nltk.tokenize import word_tokenize
from nltk.tag import pos_tag
text = "NLTK powers thousands of NLP research papers."
tokens = word_tokenize(text)
print(pos_tag(tokens))
# [('NLTK', 'NNP'), ('powers', 'VBZ'), ...]
Install via ai-supply
npx ai-supply add nltk-natural-language-toolkit
Curated mirror of the open-source NLTK (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/nltk-natural-language-toolkit/check). Click a policy:
Consume NLTK programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/nltk-natural-language-toolkit
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/nltk-natural-language-toolkit/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add nltk-natural-language-toolkit
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/nltk-natural-language-toolkit/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "nltk-natural-language-toolkit" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.