Text this: Optimal monotone relabelling of partially non-monotone ordinal data.