Python for Programmers (Alan Kwok's Library) by Paul Deitel & Harvey Deitel
Author:Paul Deitel & Harvey Deitel
Language: eng
Format: epub
Publisher: Pearson
Published: 2019-07-15T00:00:00+00:00
11.2.1 Create a TextBlob
TextBlob6 is the fundamental class for NLP with the textblob module. Let’s create a TextBlob containing two sentences:
6http://textblob.readthedocs.io/en/latest/api_reference.html#textblob.blob.TextBlob.
Click here to view code image
In [1]: from textblob import TextBlob In [2]: text = 'Today is a beautiful day. Tomorrow looks like bad weather.' In [3]: blob = TextBlob(text) In [4]: blob Out[4]: TextBlob("Today is a beautiful day. Tomorrow looks like bad weather.")
TextBlobs—and, as you’ll see shortly, Sentences and Words—support string methods and can be compared with strings. They also provide methods for various NLP tasks. Sentences, Words and TextBlobs inherit from BaseBlob, so they have many common methods and properties.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Computer Vision & Pattern Recognition | Expert Systems |
Intelligence & Semantics | Machine Theory |
Natural Language Processing | Neural Networks |
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(7845)
Hadoop in Practice by Alex Holmes(5656)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5509)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(4492)
Functional Programming in JavaScript by Mantyla Dan(3719)
The Age of Surveillance Capitalism by Shoshana Zuboff(3411)
Big Data Analysis with Python by Ivan Marin(2965)
Blockchain Basics by Daniel Drescher(2884)
The Rosie Effect by Graeme Simsion(2704)
WordPress Plugin Development Cookbook by Yannick Lefebvre(2578)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2491)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2474)
Dawn of the New Everything by Jaron Lanier(2433)
The Art Of Deception by Kevin Mitnick(2294)
Test-Driven Development with Java by Alan Mellor(2293)
Rapid Viz: A New Method for the Rapid Visualization of Ideas by Kurt Hanks & Larry Belliston(2189)
Human Dynamics Research in Smart and Connected Communities by Shih-Lung Shaw & Daniel Sui(2174)
Once Upon an Algorithm by Martin Erwig(2142)
Data Augmentation with Python by Duc Haba(2137)