Using NLTK Part-of-Speech Tagger
Learn about the Part-of-Speech tagger in the NLTK library. Gain hands-on experience using parts of speech from the NLTK library.
We'll cover the following...
NLTK taggers
The NLTK library provides different ways to implement POS tagging, including CRFTagger, StanfordPOSTagger, BrillTagger, etc., but in this lesson, we'll focus on the two most commonly used implementations:
The perceptron model, which is also the default tagger
The HMM tagger
NLTK default classifier
By default, NLTK uses a perceptron tagger, more specifically a greedy averaged perceptron tagger. This is a greedy averaged perceptron tagger, which is simply a pre-trained feed-forward neural network that guesses a tag, adjusts the weights according to whether the guess was correct, and averages the weight adjustments over the number of iterations. This creates a model that is essentially a dictionary of weights associated with the input features (or input word/sentence), that can then output the associated solution in ...