Add implementation of viterbi and fb for a linear chain crf / hmm