⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Part-of-Speech Tagging: HMM Viterbi Trellis

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.