TextBlob — Simple NLP for Marketing Copy
MIT-licensed Python NLP library with sentiment polarity/subjectivity scoring, spell correction, noun phrase extraction, and translation for copywriters.
TextBlob — Simple NLP for Marketing Copy
TextBlob is a simple, intuitive Python NLP library built for practitioners who need fast text processing without a steep learning curve. It provides sentiment analysis (polarity and subjectivity), noun phrase extraction, spell correction, word inflection, POS tagging, and language translation — all through a clean, readable API. It is widely used by marketers and content teams for quick copy quality checks, customer review mining, and A/B test copy scoring.
Key Features
sentiment.polarity(-1 to 1) andsentiment.subjectivity(0 = objective, 1 = subjective)- Noun phrase extraction for topic modeling of customer reviews
- Spell correction with
.correct() - Word inflection: pluralize, singularize, lemmatize
- Language detection and translation (via Google Translate API, optional)
- Beginner-friendly: no configuration needed
Quick Start
pip install textblob
python -m textblob.download_corpora
from textblob import TextBlob
review = TextBlob("This new ad campaign is absolutely brilliant and very creative!")
print(review.sentiment)
# Sentiment(polarity=0.75, subjectivity=0.85)
# Extract key topics from customer reviews
review2 = TextBlob("The checkout experience was confusing and the email confirmation never arrived.")
print(review2.noun_phrases)
# ['checkout experience', 'email confirmation']
npx ai-supply add textblob-sentiment-nlp
Curated mirror of the open-source TextBlob (MIT). 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/textblob-sentiment-nlp/check). Click a policy:
Consume TextBlob — Simple NLP for Marketing Copy 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/textblob-sentiment-nlp
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/textblob-sentiment-nlp/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add textblob-sentiment-nlp
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/textblob-sentiment-nlp/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "textblob-sentiment-nlp" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.