Tag NLTK – The Easy Table to know Everything

With the NLTK library, it is often difficult to find your way around, especially with the tags module (pos_tag)!

This module allows you to know the value of each word : adjective, noun, proper name, etc.

In this post, we propose you a summary table of each NLKT tags and their correspondence 😉

Tags NLTK

TagMeaning
CCCoordinating conjunction
CDCardinal number
DTDeterminer
EXExistential there
FWForeign word
INPreposition or subordinating conjunction
JJAdjective
VPVerb Phrase
JJRAdjective, comparative
JJSAdjective, superlative
LSList item marker
MDModal
NNNoun, singular or mass
NNSNoun, plural
PPPreposition Phrase
NNPProper noun, singular Phrase
NNPSProper noun, plural
PDTPre determiner
POSPossessive ending
PRPPersonal pronoun Phrase
PRPPossessive pronoun Phrase
RBAdverb
RBRAdverb, comparative
RBSAdverb, superlative
RPParticle
SSimple declarative clause
SBARClause introduced by a (possibly empty) subordinating conjunction
SBARQDirect question introduced by a wh-word or a wh-phrase.
SINVInverted declarative sentence, i.e. one in which the subject follows the tensed verb or modal.
SQInverted yes/no question, or main clause of a wh-question, following the wh-phrase in SBARQ.
SYMSymbol
VBVerb, base form
VBDVerb, past tense
VBGVerb, gerund or present participle
VBNVerb, past participle
VBPVerb, non-3rd person singular present
VBZVerb, 3rd person singular present
WDTWh-determiner
WPWh-pronoun
WPPossessive wh-pronoun
WRBWh-adverb
Tableau des correspondances des Tags

Short example of the use of the nltk.tag module :

from nltk import tag

tag.pos_tag(['I', 'am', 'a', 'tag', 'from', 'NLTK'])

Output : [(‘I’, ‘PRP’), (‘am’, ‘VBP’), (‘a’, ‘DT’), (‘tag’, ‘NN’), (‘from’, ‘IN’), (‘NLTK’, ‘NNP’)]

The tags from the NLTK library is used a lot for NLP projects but others use more classical libraries.

In this article especially, we use typical Machine Learning libraries for text classification.

A tutorial that we warmly recommend ! 🔥

Tom Keldenich
Tom Keldenich

Data Engineer & passionate about Artificial Intelligence !

Founder of the website Inside Machine Learning

Leave a Reply

Your email address will not be published.

Beginner, expert or just curious?Discover our latest news and articles on Machine Learning

Explore Machine Learning, browse our most recent notebooks and stay up to date with the latest practices and technologies!