Text this: Dynamic Programming and Bayesian Inference