A nonparametric framework for inferring orders of categorical data from category-real ordered pairs