Viterbi seems to work for an input sentence now