Natural Language Processing · Intermediate level

Intermediate level · Module 5 of 8 · 13 guided hours

Part-of-Speech Tagging and Hidden Markov Models

Grammatical analysis of text: part-of-speech tags, spaCy tagging, and Hidden Markov Models trained on a tagged corpus with a hand-built Viterbi decoder.

Learning objectives

  • Explain part-of-speech tags and use spaCy's tagger
  • Explain Hidden Markov Models for tagging
  • Implement the Viterbi algorithm and evaluate an HMM tagger

Topics

  • parts of speech and tag sets
  • POS tagging with spaCy
  • HMM states, transitions and emissions
  • estimating probabilities from a tagged corpus
  • the Viterbi algorithm
  • evaluating taggers and unknown words

Lessons

  1. Lesson 1 Parts of Speech and Tagging with spaCy

    Learners identify nouns, verbs, adjectives and other parts of speech, and use spaCy's tagger to extract information such as the actions and objects in requests.

    part of speechuniversal POS tagstoken.pos_ and token.tag_ambiguitynoun phrases

  2. Lesson 2 Hidden Markov Models for Tagging

    Learners model tagging as a Hidden Markov Model, estimating transition and emission probabilities from NLTK's Penn Treebank sample.

    hidden stateobservationtransition probabilityemission probabilityPenn Treebank sample

  3. Lesson 3 The Viterbi Algorithm and Tagger Evaluation

    Learners implement Viterbi decoding to find the most likely tag sequence, evaluate tagging accuracy and compare with spaCy.

    Viterbi algorithmdynamic programmingbackpointerstagging accuracyunknown-word accuracy

Practical activity

Build and evaluate an HMM POS tagger with a hand-written Viterbi decoder, and use spaCy tags to extract requested actions from the project's service requests.

Expected outcomes

  • Understanding of HMMs and dynamic programming
  • Practical POS-based extraction

Assessment

Viterbi implementation review (60%) and a short written explanation of HMM components (40%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.