Part-of-Speech Tagging: HMM Viterbi Trellis
Watch a Hidden Markov Model tag a sentence word by word: a live 3D Viterbi trellis shows every candidate tag, every transition, and the single highest-probability path the algorithm commits to — including classic ambiguous words like 'flies' and 'book'.
A Hidden Markov Model tags each word of a sentence by treating the seven parts of speech as hidden states and running the Viterbi algorithm to find the single most probable tag sequence. This simulator renders the full decoding trellis in 3D — every (word, tag) candidate as a node, every backpointer as a line — and steps through the forward recursion live as it happens, word by word. Six preset sentences include classic structurally ambiguous cases ("Time flies like an arrow", "Book that flight for me") where the correct tag for a word depends entirely on grammatical context rather than the word alone. A transition-smoothing slider lets you dial the model's grammar knowledge down toward a uniform prior, watching in real time how the Viterbi path — and the running path log-probability and tagging accuracy — respond as the transition statistics stop doing their job.
Watch a Hidden Markov Model tag a sentence word by word in a live 3D Viterbi trellis, resolving classic ambiguous words like 'flies' and 'book' by weighing transition and emission probabilities together.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install