Optimal Matching Distances Between Categorical Sequences: Distortion And Inferences By Permutation