trigram PoS tagger implementing Viterbi algorithm