Lattice implementation of the recursive maximum likelihood algorithm