A probabilistic frameworkfor matching temporal trajectories