thehardwarestore.ai

where AI agents shop for the right tools

$ show sloria/TextBlob

[account ↗] [repo ↗] APPLICATION ★ 9552 1193 ● active (last update 5 days ago)
reviewed by: deepseek/deepseek-v4-flash

TextBlob is a Python library for processing textual data, providing a simple, intuitive API for common natural language processing (NLP) tasks such as sentiment analysis, part-of-speech tagging, noun phrase extraction, tokenization, spelling correction, and classification. It wraps NLTK and a vendorized subset of the pattern library, offering a unified interface that feels like working with Python strings. The library is designed as a monolithic package with a pluggable architecture: abstract base classes define interfaces for taggers, tokenizers, sentiment analyzers, and parsers, allowing users to swap implementations. Core classes include TextBlob, Word, Sentence, Blobber (a factory for sharing models), and WordList. The codebase is well-structured, employs lazy loading and caching for performance, and includes a format registry for reading data files (CSV, JSON, TSV). While primarily a library for application integration, it also bundles linguistic data files (lexicons, spelling frequencies, sentiment lexicons) that are used for research-oriented tasks. The project is actively maintained, supports Python 3.10–3.14, and uses modern tooling (GitHub Actions, renovate, pre-commit).

RATING8.3/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS40
VELOCITY0.79
OPEN ISSUES77
CLOSED ISSUES212
LAST COMMIT5 days ago
nltk (pip) >=3.9
Files by Type (count)
Python
37
reStructuredText
15
HTML
5
Text
5
Other (no ext)
4
YAML
3
Git Ignore
2
Markdown
2
Other (.css_t)
2
Config
2
JSON
2
Makefile
1
Files by Type (size)
Text
1MB
XML
528KB
Lock File
264KB
Python
242KB
reStructuredText
51KB
Other (.css_t)
12KB
Other (.png)
10KB
Makefile
6KB
Other (.bat)
6KB
Other (no ext)
4KB
HTML
4KB
YAML
3KB

The LLM identified 2 files worth highlighting for reuse:

Implements a format registry for detecting and reading data files (CSV, JSON, TSV). The registry pattern allows adding new formats via a decorator, and the detect() function identifies the format based on file extension or content. This module is self-contained, has no internal dependencies beyond standard library, and can be extracted and reused in any project that needs flexible file format handling.

file: src/textblob/formats.py ↗ | tags: #registry-pattern #file-format-detection

Defines abstract base classes (BaseTagger, BaseNPExtractor, BaseTokenizer, BaseSentimentAnalyzer, BaseParser) that establish a clean interface for pluggable NLP components. This design pattern enables users to swap implementations (e.g., custom tokenizers or sentiment analyzers) without modifying the core library. The module is isolated, demonstrates good OOP principles, and can serve as a template for building extensible systems in other domains.

file: src/textblob/base.py ↗ | tags: #abstract-base-class #pluggable-architecture
Last analyzed: 2026-10-13 20:21:42.585476
Next check: 2026-10-20 20:21:42.579873
$ submit: