Homepage: https://textblob.readthedocs.org/
TextBlob is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.
from textblob import TextBlob
text = '''
The titular threat of The Blob has always struck me as the ultimate movie
monster: an insatiably hungry, amoeba-like mass able to penetrate
virtually any safeguard, capable of--as a doomed doctor chillingly
describes it--"assimilating flesh on contact.
Snide comparisons to gelatin be damned, it's a concept with the most
devastating of potential consequences, not unlike the grey goo scenario
proposed by technological theorists fearful of
artificial intelligence run rampant.
'''
blob = TextBlob(text)
blob.tags # [('The', 'DT'), ('titular', 'JJ'),
# ('threat', 'NN'), ('of', 'IN'), ...]
blob.noun_phrases # WordList(['titular threat', 'blob',
# 'ultimate movie monster',
# 'amoeba-like mass', ...])
for sentence in blob.sentences:
print(sentence.sentiment.polarity)
# 0.060
# -0.341
blob.translate(to="es") # 'La amenaza titular de The Blob...'
TextBlob stands on the giant shoulders of NLTK and pattern, and plays nicely with both.
Features
Noun phrase extraction
Part-of-speech tagging
Sentiment analysis
Classification (Naive Bayes, Decision Tree)
Language translation and detection powered by Google Translate
Tokenization (splitting text into words and sentences)
Word and phrase frequencies
Parsing
n-grams
Word inflection (pluralization and singularization) and lemmatization
Spelling correction
Add new models or languages through extensions
WordNet integration
Get it now
$ pip install -U textblob $ python -m textblob.download_corpora
Examples
See more examples at the Quickstart guide.
Documentation
Full documentation is available at https://textblob.readthedocs.org/.
Requirements
Python >= 2.6 or >= 3.3
Project Links
License
MIT licensed. See the bundled LICENSE file for more details.
Metadata
Release files for textblob 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| textblob-0.10.0.tar.gz | 632.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textblob-0.10.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / textblob-0.10.0.tar.gz
| Download URL | textblob-0.10.0.tar.gz |
|---|---|
| Size | 632.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21578da6e319a9b7e50017e5ea6f8f933bae6d908c61b53a5ef513d2935d0e37
|
|
BLAKE2b-256 checksum How to use checksums |
409047a93349c1fef859d0bd948bfda8426a50e32aaf4a35ddd5f50d755cef6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / textblob-0.10.0-py2.py3-none-any.whl
| Download URL | textblob-0.10.0-py2.py3-none-any.whl |
|---|---|
| Size | 633.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4c40df6a201569c05eea49559539854adb83faafe895ead5c216be2ad9408d79
|
|
BLAKE2b-256 checksum How to use checksums |
82887714bf1fb0a1f5cd6912bf03352a41196038589969b5c3a173e10e50c5f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |