Text this: Efficient Mixed-Order Hidden Markov Model Inference