{"id":2806,"library":"textblob","title":"TextBlob: Simple, Pythonic Text Processing","description":"TextBlob is a Python library designed for processing textual data, providing a simplified API for common Natural Language Processing (NLP) tasks. It encompasses functionalities like sentiment analysis, part-of-speech tagging, noun phrase extraction, and more, building on top of NLTK and pattern libraries. The current version is 0.20.0, with a release cadence that indicates active maintenance and updates, as seen with recent releases in late 2025 and early 2026.","status":"active","version":"0.20.0","language":"python","source_language":"en","source_url":"https://github.com/sloria/TextBlob","tags":["nlp","text-processing","sentiment-analysis","part-of-speech-tagging","noun-phrase-extraction","nltk"],"install":[{"cmd":"pip install textblob","lang":"bash","label":"Install TextBlob"},{"cmd":"python -m textblob.download_corpora","lang":"bash","label":"Download NLTK Corpora (Essential)"}],"dependencies":[{"reason":"TextBlob relies on NLTK for core NLP functionalities; it is automatically installed but requires separate corpus downloads.","package":"NLTK","optional":false},{"reason":"Required for certain advanced features like the maximum entropy classifier, but not for basic usage.","package":"numpy","optional":true}],"imports":[{"symbol":"TextBlob","correct":"from textblob import TextBlob"},{"note":"The core package was renamed from 'text' to 'textblob' in version 0.8.0. Older imports will fail.","wrong":"from text.blob import TextBlob","symbol":"TextBlob (legacy)","correct":"from textblob import TextBlob"},{"note":"Python is case-sensitive; the class name is 'TextBlob' (capital T and B).","wrong":"from textblob import textblob","symbol":"TextBlob (casing)","correct":"from textblob import TextBlob"}],"quickstart":{"code":"from textblob import TextBlob\n\ntext = \"TextBlob is amazingly simple to use. What great fun!\"\nblob = TextBlob(text)\n\nprint(f\"Original text: {text}\")\nprint(f\"Sentiment Polarity: {blob.sentiment.polarity}\") # Range [-1.0, 1.0]\nprint(f\"Sentiment Subjectivity: {blob.sentiment.subjectivity}\") # Range [0.0, 1.0]\nprint(f\"Part-of-speech tags: {blob.tags}\")\nprint(f\"Noun phrases: {blob.noun_phrases}\")\n\n# Example of a common warning: not downloading corpora leads to LookupError\n# Run `python -m textblob.download_corpora` if you get a LookupError.","lang":"python","description":"This quickstart demonstrates basic sentiment analysis, part-of-speech tagging, and noun phrase extraction using TextBlob. It initializes a TextBlob object with a string and then accesses its `sentiment`, `tags`, and `noun_phrases` properties."},"warnings":[{"fix":"Run `python -m textblob.download_corpora` after installation. For minimal corpora, use `python -m textblob.download_corpora lite`.","message":"Failing to download NLTK corpora will result in `LookupError` when performing NLP tasks (e.g., sentiment analysis, POS tagging). This is a very common initial setup mistake.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update import statements from `text.blob` to `textblob`.","message":"The main package import path changed from `from text.blob import TextBlob` to `from textblob import TextBlob`.","severity":"breaking","affected_versions":"<=0.7.1 to >=0.8.0"},{"fix":"Rename your script file to something other than `textblob.py` (e.g., `my_script.py`).","message":"Naming your Python script file `textblob.py` can cause an import collision, leading to `AttributeError` or `ImportError` because Python will try to import your local file instead of the installed library.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure correct casing: `from textblob import TextBlob`.","message":"The main class is `TextBlob` (capital 'T' and 'B'). Using `textblob` (lowercase) in the import statement will result in an `ImportError` or `AttributeError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to Python 3.7 or newer. TextBlob 0.20.0 requires Python >=3.10.","message":"Support for Python 3.4 was officially dropped.","severity":"breaking","affected_versions":">=0.16.0"},{"fix":"Use a dedicated HTML parsing library like Beautiful Soup (`BeautifulSoup(html_doc).get_text()`) for HTML cleaning.","message":"The `clean_html` parameter has been deprecated. It was removed as it was also deprecated in NLTK.","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"Call `json()` as a method: `blob.json()` instead of accessing it as a property `blob.json`.","message":"The `TextBlob.json` property was changed to a method `TextBlob.json()`.","severity":"breaking","affected_versions":">=0.11.0"}],"env_vars":null,"search_vec":"'0.20.0':55 '2025':73 '2026':76 'activ':62 'analysi':32,83 'api':19 'build':43 'cadenc':59 'common':21 'current':52 'data':15 'design':11 'earli':75 'encompass':28 'extract':40,92 'function':29 'indic':61 'languag':23 'late':72 'librari':10,50 'like':30 'mainten':63 'natur':22 'nlp':25,77 'nltk':47,93 'noun':38,90 'noun-phrase-extract':89 'part':34,85 'part-of-speech':33 'part-of-speech-tag':84 'pattern':49 'phrase':39,91 'process':5,13,24,80 'provid':16 'python':3,9 'recent':69 'releas':58,70 'seen':67 'sentiment':31,82 'sentiment-analysi':81 'simpl':2 'simplifi':18 'speech':36,87 'tag':37,88 'task':26 'text':4,79 'text-process':78 'textblob':1,6 'textual':14 'top':45 'updat':65 'version':53","created_at":"2026-04-11T01:43:34.661776+00:00","updated_at":"2026-04-16T22:51:57.464217+00:00","problems":[{"fix":"python -m textblob.download_corpora","cause":"TextBlob requires NLTK corpora and data from its bundled 'pattern' library, which are not included in the default installation and must be downloaded separately.","error":"NLTK tokenizers and taggers are not available. Please run `python -m textblob.download_corpora` or install the `pattern` library."},{"fix":"pip install textblob","cause":"The TextBlob library is not installed in the Python environment being used.","error":"ModuleNotFoundError: No module named 'textblob'"},{"fix":"Access the property without parentheses, for example: `for word in blob.words:`","cause":"The user attempted to call a TextBlob property (like `blob.words` or `blob.sentences`) as if it were a method, but it is an attribute that returns a list-like object directly.","error":"AttributeError: 'WordList' object is not callable"},{"fix":"Ensure you have an active internet connection and that the external translation service is available.","cause":"TextBlob's translation feature relies on an external API (Google Translate) and this error occurs if there is no internet connection, the API is unreachable, or the translation request fails.","error":"textblob.exceptions.TranslatorError: There was an error translating the text."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.20.1","cli_name":"","cli_version":null,"type":"library","homepage":"https://textblob.readthedocs.io/","github":"https://github.com/sloria/TextBlob","docs":null,"changelog":"https://textblob.readthedocs.io/en/latest/changelog.html","pypi":"https://pypi.org/project/textblob/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-28","install_tag":null}}