Python TextBlob parts of speech tagging using TextBlob














































Python TextBlob parts of speech tagging using TextBlob



PART OF SPEECH TAGGING USING TEXTBLOB IN PYTHON

One of the more powerful aspects of the TextBlob module is the Part of Speech tagging that it can do for you.

This means labelling words in a sentence as nouns, adjectives, verbs...etc. Even more impressive, it also labels by tense, and more. Here's a list of the tags, what they mean, and some examples:

Here's a list of the tags, what they mean, and some examples:

CC coordinating conjunction
CD cardinal digit
DT determiner
EX existential there (like u, 'there is'...... think of it like 'there exists')
FW foreign word
IN preposition/subordinating conjunction
JJ adjective big
JJR adjective, comparative bigger
JJS adjective, superlative biggest
LS list marker 1)
MD modal could, will
NN noun, singular desk
NNS noun plural desks

NNP proper noun, singular Harrison
NNPS proper noun, plural Americans
PDT predeterminer all the kids
POS possessive ending parents
PRP personal pronoun I, he, she
PRP$ possessive pronoun my, his, hers
RB adverb very, silently,
RBR adverb, comparative better
RBS adverb, superlative best
RP particle give up
TO to go to the store.
UH interjection errrrrrrrm
VB verb, base form take
VBD verb, past tense, took
VBG verb, gerund/present participle taking
VBN verb, the past participle is taken
VBP verb, sing. present, non-3d take
VBZ verb, 3rd person sing. present takes
WDT wh-determiner which

WP wh-pronoun who, what
WP$ possessive wh-pronoun whose
WRB wh-adverb where, when

How might we use this?

While we're at it, we're going to cover a new
sentence tokenizer called the PunktSentenceTokenizer.

This tokenizer is capable of unsupervised
machine learning, so you can actually train it on anybody of text that you
use. 

Program for Parts of Speech tagging using
TextBlob in Python.


Output:



Conclusion:

Using parts of speech we labeled sentence as
noun, adjective, or verb.



Comments