Text this: Efficient Decoding of High-order Hidden Markov Models