Assuming we have a sequence of input words X = x 1 ...x n and want to compute a sequence of output tags Y = y 1 ...y n . In an HMM to compute the best tag sequence that maximizes P(Y |X) we rely on Bayes' rule and the likelihood P(X|Y ):