Text this: Optimal State Estimation of a Generalized MAP Event Flow with an Arbitrary Number of States.