NLP with TextBlob

TextBlob is a Python library that provides a simple API for common NLP tasks and builds on the Natural Language Toolkit (NLTK) and the Pattern web mining libraries. TextBlob facilitates POS tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.

To illustrate the use of TextBlob, we sample a BBC sports article with the headline Robinson ready for difficult task. Similarly to spaCy and other libraries, the first step is to pass the document through a pipeline represented by the TextBlob object to assign annotations required for various tasks (see the nlp_with_textblob notebook for this section):

from textblob import TextBlob
article = docs.sample(1).squeeze()
parsed_body = TextBlob(article.body)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.105.105