Simple, Pythonic text processing · sentiment · POS · noun phrases · built on NLTK · verified against TextBlob 0.20.x (2026)

TextBlob cheat sheet

TextBlob wraps NLTK & the Pattern library behind one friendly object. Make a TextBlob from a string and everything is an attribute: .words, .sentences, .tags (POS), .noun_phrases, .sentiment. It's the fastest way to get sentiment, part-of-speech tags, spelling correction, and simple classification working — ideal for teaching, prototypes, and quick baselines (reach for spaCy/HF transformers for production). Targets TextBlob 0.20.x, Python 3.10+.

setup & the blob parsing sentiment words & spelling advanced & ecosystem gotcha / removed most common

Verified 2026-08-31 against the official docs at textblob.readthedocs.io (TextBlob 0.20.1, released 2026-07-18; Python 3.10–3.14). Wraps NLTK; run python -m textblob.download_corpora once after install. Note: .translate() / .detect_language() were removed (they used an unofficial Google endpoint) — see card 11.

Outline

One TextBlob(text) object exposes everything as attributes. Learn the object, then reach for tags, sentiment, word tools, and classification.

Getting started

  1. 1Install & corpora
  2. 2The TextBlob object

Parsing

  1. 3Tokenize & POS tags
  2. 4Noun phrases

Sentiment

  1. 5Sentiment analysis

Words & spelling

  1. 6Inflection & lemmatize
  2. 7Spelling correction
  3. 8WordNet & definitions

Advanced & ecosystem

  1. 9n-grams & counts
  2. 10Text classification
  3. 11Gotchas & ecosystem

Getting Started

Install, grab the corpora, and meet the one object you'll use for everything.

1Install & corporapip + nltk data
2The TextBlob objecteverything is an attr

Parsing

Tokens, part-of-speech tags, and noun-phrase chunks — all as attributes.

3Tokenize & POS tags.words / .tags
4Noun phrases.noun_phrases

Sentiment

Polarity and subjectivity out of the box — and a Bayesian alternative.

5Sentiment analysis.sentiment

Words & Spelling

Singularize, lemmatize, correct spelling, and reach WordNet.

6Inflection & lemmatizeWord objects
7Spelling correction.correct()
8WordNet & definitionslexical database

Advanced & Ecosystem

n-grams, a tiny classifier, and where TextBlob fits (and what's gone).

9n-grams & countsfeatures
10Text classificationtiny models
11Gotchas & ecosystemwhat's gone, what next

Worth memorizing

TextBlob(text)one object; everything is an attribute
download_corporarun once or you get LookupError
.words / .sentencestokenized WordList / Sentence blobs
.tags(word, POS) tuples (Penn Treebank)
.noun_phraseslowercased phrase chunks
.sentimentpolarity [-1,1] + subjectivity [0,1]
NaiveBayesAnalyzeranalyzer= for class + probabilities
Word().lemmatize("v")pass POS — default is noun
.correct() / .spellcheck()heuristic spelling
NaiveBayesClassifiertrain from (text,label) tuples
.translate() REMOVEDuse deep-translator / a cloud API
production?spaCy / NLTK / HF transformers instead